use of org.eclipse.ceylon.compiler.java.runtime.metamodel.meta.ClassOrInterfaceImpl in project ceylon by eclipse.
the class Metamodel method getReflectedAnnotationClass.
/**
* returns the java.lang.Class of the given the Ceylon metamodel of
* an annotation class.
*/
public static <Value extends java.lang.annotation.Annotation, Values, ProgramElement extends Annotated> Class<?> getReflectedAnnotationClass(ClassOrInterface<? extends java.lang.annotation.Annotation> annotationType) {
ClassOrInterfaceDeclarationImpl freeClass;
if (annotationType instanceof ClassOrInterfaceImpl) {
freeClass = (ClassOrInterfaceDeclarationImpl) ((ClassOrInterfaceImpl<?>) annotationType).getDeclaration();
} else {
freeClass = (ClassOrInterfaceDeclarationImpl) annotationType;
}
final Class<?> refAnnotationClass = getJavaClass(freeClass.declaration);
return refAnnotationClass;
}
Aggregations