use of com.intellij.util.xml.JavaMethod in project intellij-community by JetBrains.
the class FixedChildDescriptionImpl method getAnnotation.
@Override
@Nullable
public <T extends Annotation> T getAnnotation(int index, Class<? extends T> annotationClass) {
final JavaMethod method = getGetterMethod(index);
if (method != null) {
final T annotation = method.getAnnotation(annotationClass);
if (annotation != null)
return annotation;
}
final Type elemType = getType();
if (elemType instanceof AnnotatedElement) {
T annotation = ((AnnotatedElement) elemType).getAnnotation(annotationClass);
if (annotation != null)
return annotation;
}
return super.getAnnotation(annotationClass);
}
Aggregations