Search in sources :

Example 1 with AnnotationFieldName

use of org.eclipse.ceylon.compiler.java.codegen.AnnotationFieldName in project ceylon by eclipse.

the class AnnotationLoader method loadAnnotationInvocation.

private AnnotationInvocation loadAnnotationInvocation(LazyFunction method, AnnotatedMirror annoInstMirror, MethodMirror meth) {
    AnnotationInvocation ai = null;
    AnnotationMirror annotationInvocationAnnotation = null;
    List<AnnotationMirror> annotationTree = getAnnotationArrayValue(annoInstMirror, AbstractModelLoader.CEYLON_ANNOTATION_INSTANTIATION_TREE_ANNOTATION, "value");
    if (annotationTree != null && !annotationTree.isEmpty()) {
        annotationInvocationAnnotation = annotationTree.get(0);
    } else {
        annotationInvocationAnnotation = annoInstMirror.getAnnotation(AbstractModelLoader.CEYLON_ANNOTATION_INSTANTIATION_ANNOTATION);
    }
    // stringValueAnnotation = annoInstMirror.getAnnotation(CEYLON_STRING_VALUE_ANNOTATION);
    if (annotationInvocationAnnotation != null) {
        ai = new AnnotationInvocation();
        setPrimaryFromAnnotationInvocationAnnotation(annotationInvocationAnnotation, ai);
        loadAnnotationInvocationArguments(new ArrayList<AnnotationFieldName>(2), method, ai, annotationInvocationAnnotation, annotationTree, annoInstMirror);
    }
    return ai;
}
Also used : AnnotationMirror(org.eclipse.ceylon.model.loader.mirror.AnnotationMirror) AnnotationInvocation(org.eclipse.ceylon.compiler.java.codegen.AnnotationInvocation) AnnotationFieldName(org.eclipse.ceylon.compiler.java.codegen.AnnotationFieldName)

Aggregations

AnnotationFieldName (org.eclipse.ceylon.compiler.java.codegen.AnnotationFieldName)1 AnnotationInvocation (org.eclipse.ceylon.compiler.java.codegen.AnnotationInvocation)1 AnnotationMirror (org.eclipse.ceylon.model.loader.mirror.AnnotationMirror)1