Example usage for org.eclipse.jdt.internal.compiler.lookup ElementValuePair getMethodBinding

List of usage examples for org.eclipse.jdt.internal.compiler.lookup ElementValuePair getMethodBinding

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.lookup ElementValuePair getMethodBinding.

Prototype

public MethodBinding getMethodBinding() 

Source Link

Usage

From source file:com.redhat.ceylon.eclipse.core.model.mirror.JDTAnnotation.java

License:Open Source License

public JDTAnnotation(AnnotationBinding annotation) {
    values = new HashMap<String, Object>();
    ElementValuePair[] annotationVaues = annotation.getElementValuePairs();
    for (ElementValuePair annotationValue : annotationVaues) {
        String name = new String(annotationValue.getName());
        MethodBinding elementMethod = annotationValue.getMethodBinding();
        Object value = null;//from ww  w  .  ja  va  2  s  . c  o  m
        if (elementMethod != null) {
            value = convertValue(annotationValue.getMethodBinding().returnType, annotationValue.getValue());
        } else {
            value = JDTType.UNKNOWN_TYPE;
        }
        values.put(name, value);
    }
}