Search in sources :

Example 1 with AnnotationFieldName

use of com.redhat.ceylon.compiler.java.codegen.AnnotationFieldName in project ceylon-compiler by ceylon.

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(com.redhat.ceylon.model.loader.mirror.AnnotationMirror) AnnotationInvocation(com.redhat.ceylon.compiler.java.codegen.AnnotationInvocation) AnnotationFieldName(com.redhat.ceylon.compiler.java.codegen.AnnotationFieldName)

Aggregations

AnnotationFieldName (com.redhat.ceylon.compiler.java.codegen.AnnotationFieldName)1 AnnotationInvocation (com.redhat.ceylon.compiler.java.codegen.AnnotationInvocation)1 AnnotationMirror (com.redhat.ceylon.model.loader.mirror.AnnotationMirror)1