Search in sources :

Example 1 with DeclaredType

use of org.eclipse.ceylon.javax.lang.model.type.DeclaredType in project ceylon by eclipse.

the class JavacElements method getElementValuesWithDefaults.

public Map<MethodSymbol, Attribute> getElementValuesWithDefaults(AnnotationMirror a) {
    Attribute.Compound anno = cast(Attribute.Compound.class, a);
    DeclaredType annotype = a.getAnnotationType();
    Map<MethodSymbol, Attribute> valmap = anno.getElementValues();
    for (ExecutableElement ex : methodsIn(annotype.asElement().getEnclosedElements())) {
        MethodSymbol meth = (MethodSymbol) ex;
        Attribute defaultValue = meth.getDefaultValue();
        if (defaultValue != null && !valmap.containsKey(meth)) {
            valmap.put(meth, defaultValue);
        }
    }
    return valmap;
}
Also used : DeclaredType(org.eclipse.ceylon.javax.lang.model.type.DeclaredType)

Aggregations

DeclaredType (org.eclipse.ceylon.javax.lang.model.type.DeclaredType)1