Home
last modified time | relevance | path

Searched refs:annotationClass (Results 1 – 25 of 26) sorted by relevance

12

/libcore/ojluni/src/main/java/java/lang/reflect/
DAnnotatedElement.java252 default boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) { in isAnnotationPresent() argument
253 return getAnnotation(annotationClass) != null; in isAnnotationPresent()
268 <T extends Annotation> T getAnnotation(Class<T> annotationClass); in getAnnotation() argument
319 default <T extends Annotation> T[] getAnnotationsByType(Class<T> annotationClass) { in getAnnotationsByType() argument
328 return AnnotatedElements.getDirectOrIndirectAnnotationsByType(this, annotationClass); in getAnnotationsByType()
351 default <T extends Annotation> T getDeclaredAnnotation(Class<T> annotationClass) { in getDeclaredAnnotation() argument
352 Objects.requireNonNull(annotationClass); in getDeclaredAnnotation()
355 if (annotationClass.equals(annotation.annotationType())) { in getDeclaredAnnotation()
358 return annotationClass.cast(annotation); in getDeclaredAnnotation()
408 default <T extends Annotation> T[] getDeclaredAnnotationsByType(Class<T> annotationClass) { in getDeclaredAnnotationsByType() argument
[all …]
DAccessibleObject.java200 public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { in getAnnotation() argument
210 public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) { in isAnnotationPresent() argument
211 return AnnotatedElement.super.isAnnotationPresent(annotationClass); in isAnnotationPresent()
219 public <T extends Annotation> T[] getAnnotationsByType(Class<T> annotationClass) { in getAnnotationsByType() argument
235 public <T extends Annotation> T getDeclaredAnnotation(Class<T> annotationClass) { in getDeclaredAnnotation() argument
239 return getAnnotation(annotationClass); in getDeclaredAnnotation()
247 public <T extends Annotation> T[] getDeclaredAnnotationsByType(Class<T> annotationClass) { in getDeclaredAnnotationsByType() argument
251 return getAnnotationsByType(annotationClass); in getDeclaredAnnotationsByType()
DParameter.java275 public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { in getAnnotation() argument
276 Objects.requireNonNull(annotationClass); in getAnnotation()
278 return getAnnotationNative(executable, index, annotationClass); in getAnnotation()
290 public <T extends Annotation> T[] getAnnotationsByType(Class<T> annotationClass) { in getAnnotationsByType() argument
292 return AnnotatedElements.getDirectOrIndirectAnnotationsByType(this, annotationClass); in getAnnotationsByType()
305 public <T extends Annotation> T getDeclaredAnnotation(Class<T> annotationClass) { in getDeclaredAnnotation() argument
309 return getAnnotation(annotationClass); in getDeclaredAnnotation()
316 public <T extends Annotation> T[] getDeclaredAnnotationsByType(Class<T> annotationClass) { in getDeclaredAnnotationsByType() argument
320 return getAnnotationsByType(annotationClass); in getDeclaredAnnotationsByType()
DField.java895 public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { in getAnnotation() argument
896 Objects.requireNonNull(annotationClass); in getAnnotation()
898 return getAnnotationNative(annotationClass); in getAnnotation()
910 public <T extends Annotation> T[] getAnnotationsByType(Class<T> annotationClass) { in getAnnotationsByType() argument
912 return AnnotatedElements.getDirectOrIndirectAnnotationsByType(this, annotationClass); in getAnnotationsByType()
DExecutable.java538 public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { in getAnnotation() argument
539 Objects.requireNonNull(annotationClass); in getAnnotation()
541 return getAnnotationNative(annotationClass); in getAnnotation()
546 private native <T extends Annotation> T getAnnotationNative(Class<T> annotationClass); in getAnnotationNative() argument
553 public <T extends Annotation> T[] getAnnotationsByType(Class<T> annotationClass) { in getAnnotationsByType() argument
555 return AnnotatedElements.getDirectOrIndirectAnnotationsByType(this, annotationClass); in getAnnotationsByType()
DConstructor.java382 public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { in getAnnotation() argument
383 return super.getAnnotation(annotationClass); in getAnnotation()
DMethod.java493 public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { in getAnnotation() argument
494 return super.getAnnotation(annotationClass); in getAnnotation()
/libcore/luni/src/main/java/libcore/reflect/
DAnnotatedElements.java43 AnnotatedElement element, Class<T> annotationClass) { in getDirectOrIndirectAnnotationsByType() argument
44 if (annotationClass == null) { in getDirectOrIndirectAnnotationsByType()
54 getRepeatableAnnotationContainerClassFor(annotationClass); in getDirectOrIndirectAnnotationsByType()
57 if (annotationClass.isInstance(annotations[i])) { in getDirectOrIndirectAnnotationsByType()
63 insertAnnotationValues(annotations[i], annotationClass, unfoldedAnnotations); in getDirectOrIndirectAnnotationsByType()
67 return unfoldedAnnotations.toArray((T[])Array.newInstance(annotationClass, 0)); in getDirectOrIndirectAnnotationsByType()
79 Class<T> annotationClass, ArrayList<T> unfoldedAnnotations) { in insertAnnotationValues() argument
90 (Class<T[]>)((T[])Array.newInstance(annotationClass, 0)).getClass(); in insertAnnotationValues()
99 "annotation element class = " + annotationClass + "; missing value() method"); in insertAnnotationValues()
107 "annotation element class = " + annotationClass + "; value() doesn't return array"); in insertAnnotationValues()
[all …]
/libcore/ojluni/annotations/sdk/nullability/java/lang/reflect/
DAnnotatedElement.annotated.java36 …l.NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass) { throw new … in isAnnotationPresent() argument
38 …g.annotation.Annotation> T getAnnotation(@libcore.util.NonNull java.lang.Class<T> annotationClass); in getAnnotation() argument
42 …n> T[] getAnnotationsByType(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new … in getAnnotationsByType() argument
44 …on> T getDeclaredAnnotation(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new … in getDeclaredAnnotation() argument
46 …etDeclaredAnnotationsByType(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new … in getDeclaredAnnotationsByType() argument
DAccessibleObject.annotated.java42 …Annotation> T getAnnotation(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new … in getAnnotation() argument
44 …l.NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass) { throw new … in isAnnotationPresent() argument
46 …n> T[] getAnnotationsByType(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new … in getAnnotationsByType() argument
50 …on> T getDeclaredAnnotation(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new … in getDeclaredAnnotation() argument
52 …etDeclaredAnnotationsByType(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new … in getDeclaredAnnotationsByType() argument
DParameter.annotated.java59 …Annotation> T getAnnotation(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new … in getAnnotation() argument
61 …n> T[] getAnnotationsByType(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new … in getAnnotationsByType() argument
65 …on> T getDeclaredAnnotation(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new … in getDeclaredAnnotation() argument
67 …etDeclaredAnnotationsByType(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new … in getDeclaredAnnotationsByType() argument
DExecutable.annotated.java64 …Annotation> T getAnnotation(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new … in getAnnotation() argument
66 …n> T[] getAnnotationsByType(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new … in getAnnotationsByType() argument
DField.annotated.java94 …Annotation> T getAnnotation(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new … in getAnnotation() argument
96 …n> T[] getAnnotationsByType(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new … in getAnnotationsByType() argument
DConstructor.annotated.java68 …Annotation> T getAnnotation(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new … in getAnnotation() argument
DMethod.annotated.java78 …Annotation> T getAnnotation(@libcore.util.NonNull java.lang.Class<T> annotationClass) { throw new … in getAnnotation() argument
/libcore/ojluni/annotations/hiddenapi/java/lang/reflect/
DAccessibleObject.java57 java.lang.Class<T> annotationClass) { in getAnnotation() argument
62 java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass) { in isAnnotationPresent() argument
67 java.lang.Class<T> annotationClass) { in getAnnotationsByType() argument
76 java.lang.Class<T> annotationClass) { in getDeclaredAnnotation() argument
81 java.lang.Class<T> annotationClass) { in getDeclaredAnnotationsByType() argument
DParameter.java95 java.lang.Class<T> annotationClass) { in getAnnotation() argument
105 java.lang.Class<T> annotationClass) { in getAnnotationsByType() argument
114 java.lang.Class<T> annotationClass) { in getDeclaredAnnotation() argument
119 java.lang.Class<T> annotationClass) { in getDeclaredAnnotationsByType() argument
DExecutable.java131 java.lang.Class<T> annotationClass) { in getAnnotation() argument
136 java.lang.Class<T> annotationClass); in getAnnotationNative() argument
139 java.lang.Class<T> annotationClass) { in getAnnotationsByType() argument
DField.java146 java.lang.Class<T> annotationClass) { in getAnnotation() argument
154 java.lang.Class<T> annotationClass) { in getAnnotationsByType() argument
/libcore/luni/src/test/java/libcore/java/lang/reflect/annotations/
DRetentionPolicyTest.java96 Class<? extends Annotation> annotationClass = getAnnotationClass( in testRetentionPolicy_targetSdkVersion_23() local
100 getRetentionAnnotationsClass().getAnnotation(annotationClass); in testRetentionPolicy_targetSdkVersion_23()
109 Class<? extends Annotation> annotationClass = getAnnotationClass( in testRetentionPolicy_targetSdkVersion_24() local
112 getRetentionAnnotationsClass().getAnnotation(annotationClass); in testRetentionPolicy_targetSdkVersion_24()
/libcore/ojluni/src/main/java/java/lang/
DPackage.java402 public <A extends Annotation> A getAnnotation(Class<A> annotationClass) { in getAnnotation() argument
403 return getPackageInfo().getAnnotation(annotationClass); in getAnnotation()
412 public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) { in isAnnotationPresent() argument
413 return AnnotatedElement.super.isAnnotationPresent(annotationClass); in isAnnotationPresent()
421 public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationClass) { in getAnnotationsByType() argument
422 return getPackageInfo().getAnnotationsByType(annotationClass); in getAnnotationsByType()
437 public <A extends Annotation> A getDeclaredAnnotation(Class<A> annotationClass) { in getDeclaredAnnotation() argument
438 return getPackageInfo().getDeclaredAnnotation(annotationClass); in getDeclaredAnnotation()
446 public <A extends Annotation> A[] getDeclaredAnnotationsByType(Class<A> annotationClass) { in getDeclaredAnnotationsByType() argument
447 return getPackageInfo().getDeclaredAnnotationsByType(annotationClass); in getDeclaredAnnotationsByType()
DClass.java2521 public <A extends Annotation> A getAnnotation(Class<A> annotationClass) { in getAnnotation() argument
2522 Objects.requireNonNull(annotationClass); in getAnnotation()
2524 A annotation = getDeclaredAnnotation(annotationClass); in getAnnotation()
2529 if (annotationClass.isDeclaredAnnotationPresent(Inherited.class)) { in getAnnotation()
2531 annotation = sup.getDeclaredAnnotation(annotationClass); in getAnnotation()
2547 public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) { in isAnnotationPresent() argument
2548 if (annotationClass == null) { in isAnnotationPresent()
2552 if (isDeclaredAnnotationPresent(annotationClass)) { in isAnnotationPresent()
2556 if (annotationClass.isDeclaredAnnotationPresent(Inherited.class)) { in isAnnotationPresent()
2558 if (sup.isDeclaredAnnotationPresent(annotationClass)) { in isAnnotationPresent()
[all …]
/libcore/ojluni/annotations/mmodule/java/lang/
DClass.annotated.java170 … java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annotationClass) { throw new … in getAnnotation() argument
172 …onPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass) { throw new … in isAnnotationPresent() argument
174 …g.annotation.Annotation> A[] getAnnotationsByType(java.lang.Class<A> annotationClass) { throw new … in getAnnotationsByType() argument
178 …tends java.lang.annotation.Annotation> A getDeclaredAnnotation(java.lang.Class<A> annotationClass); in getDeclaredAnnotation() argument
/libcore/ojluni/annotations/hiddenapi/java/lang/
DClass.java363 java.lang.Class<A> annotationClass) { in getAnnotation() argument
368 java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass) { in isAnnotationPresent() argument
373 java.lang.Class<A> annotationClass) { in getAnnotationsByType() argument
382 java.lang.Class<A> annotationClass); in getDeclaredAnnotation() argument
387 java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass); in isDeclaredAnnotationPresent() argument
/libcore/ojluni/annotations/sdk/nullability/java/lang/
DClass.annotated.java161 …Annotation> A getAnnotation(@libcore.util.NonNull java.lang.Class<A> annotationClass) { throw new … in getAnnotation() argument
163 …l.NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass) { throw new … in isAnnotationPresent() argument
165 …ull [] getAnnotationsByType(@libcore.util.NonNull java.lang.Class<A> annotationClass) { throw new … in getAnnotationsByType() argument
169 …re.util.Nullable A getDeclaredAnnotation(@libcore.util.NonNull java.lang.Class<A> annotationClass); in getDeclaredAnnotation() argument

12