MCPcopy Create free account
hub / github.com/antlr/codebuff / getAnnotation

Method getAnnotation

corpus/java/training/guava/reflect/Parameter.java:65–75  ·  view source on GitHub ↗
(Class<A> annotationType)

Source from the content-addressed store, hash-verified

63 }
64
65 @Override
66 @Nullable
67 public <A extends Annotation> A getAnnotation(Class<A> annotationType) {
68 checkNotNull(annotationType);
69 for (Annotation annotation : annotations) {
70 if (annotationType.isInstance(annotation)) {
71 return annotationType.cast(annotation);
72 }
73 }
74 return null;
75 }
76
77 @Override
78 public Annotation[] getAnnotations() {

Callers 1

isAnnotationPresentMethod · 0.95

Calls 2

checkNotNullMethod · 0.45
castMethod · 0.45

Tested by

no test coverage detected