MCPcopy Create free account
hub / github.com/ReadyTalk/avian / getAnnotation

Method getAnnotation

classpath/java/lang/reflect/Method.java:117–128  ·  view source on GitHub ↗
(Class<T> class_)

Source from the content-addressed store, hash-verified

115 }
116
117 public <T extends Annotation> T getAnnotation(Class<T> class_) {
118 if (vmMethod.hasAnnotations()) {
119 Object[] table = (Object[]) vmMethod.addendum.annotationTable;
120 for (int i = 0; i < table.length; ++i) {
121 Object[] a = (Object[]) table[i];
122 if (a[1] == class_) {
123 return (T) Classes.getAnnotation(vmMethod.class_.loader, a);
124 }
125 }
126 }
127 return null;
128 }
129
130 public Annotation[] getAnnotations() {
131 if (vmMethod.hasAnnotations()) {

Callers 1

mainMethod · 0.95

Calls 2

getAnnotationMethod · 0.95
hasAnnotationsMethod · 0.45

Tested by 1

mainMethod · 0.76