/libcore/ojluni/src/main/java/java/lang/annotation/ |
D | IncompleteAnnotationException.java | 44 private Class<? extends Annotation> annotationType; field in IncompleteAnnotationException 56 Class<? extends Annotation> annotationType, in IncompleteAnnotationException() argument 58 super(annotationType.getName() + " missing element " + in IncompleteAnnotationException() 61 this.annotationType = annotationType; in IncompleteAnnotationException() 72 public Class<? extends Annotation> annotationType() { in annotationType() method in IncompleteAnnotationException 73 return annotationType; in annotationType()
|
D | Annotation.java | 135 Class<? extends Annotation> annotationType(); in annotationType() method
|
/libcore/luni/src/test/java/libcore/java/lang/reflect/annotations/ |
D | AnnotatedElementTestSupport.java | 168 result.add(annotation.annotationType()); in annotationsToTypes() 202 AnnotatedElement element, Class<? extends Annotation> annotationType, in assertIsAnnotationPresent() argument 204 assertEquals("element.isAnnotationPresent() for " + element + " and " + annotationType, in assertIsAnnotationPresent() 205 expected, element.isAnnotationPresent(annotationType)); in assertIsAnnotationPresent() 214 Class<? extends Annotation> annotationType, String expectedAnnotationString) { in assertGetDeclaredAnnotation() argument 215 Annotation annotation = annotatedElement.getDeclaredAnnotation(annotationType); in assertGetDeclaredAnnotation() 225 AnnotatedElement annotatedElement, Class<? extends Annotation> annotationType, in assertGetDeclaredAnnotationsByType() argument 227 Annotation[] annotations = annotatedElement.getDeclaredAnnotationsByType(annotationType); in assertGetDeclaredAnnotationsByType() 237 Class<? extends Annotation> annotationType, String[] expectedAnnotationStrings) in assertGetAnnotationsByType() argument 239 Annotation[] annotations = annotatedElement.getAnnotationsByType(annotationType); in assertGetAnnotationsByType() [all …]
|
D | PackageTest.java | 57 Class<?> classInPackage, Class<? extends Annotation> annotationType, in checkDeclaredAnnotation() argument 62 assertIsAnnotationPresent(aPackage, annotationType, expectedAnnotationString != null); in checkDeclaredAnnotation() 65 assertGetDeclaredAnnotation(aPackage, annotationType, expectedAnnotationString); in checkDeclaredAnnotation() 93 Class<?> classInPackage, Class<? extends Annotation> annotationType, in assertGetDeclaredAnnotationsByType() argument 97 aPackage, annotationType, expectedAnnotationStrings); in assertGetDeclaredAnnotationsByType() 123 Class<? extends Annotation> annotationType, in assertGetAnnotationsByType() argument 127 aPackage, annotationType, expectedAnnotationStrings); in assertGetAnnotationsByType()
|
D | FieldTest.java | 87 Class<?> c, String fieldName, Class<? extends Annotation> annotationType, in checkDeclaredAnnotation() argument 92 assertIsAnnotationPresent(field, annotationType, expectedAnnotationString != null); in checkDeclaredAnnotation() 95 assertGetDeclaredAnnotation(field, annotationType, expectedAnnotationString); in checkDeclaredAnnotation() 123 Class<?> c, Class<? extends Annotation> annotationType, String fieldName, in assertGetDeclaredAnnotationsByType() argument 127 field, annotationType, expectedAnnotationStrings); in assertGetDeclaredAnnotationsByType() 155 Class<?> c, Class<? extends Annotation> annotationType, in assertGetAnnotationsByType() argument 159 field, annotationType, expectedAnnotationStrings); in assertGetAnnotationsByType()
|
D | ConstructorTest.java | 85 Class<? extends Annotation> annotationType, in checkDeclaredAnnotation() argument 90 assertIsAnnotationPresent(constructor, annotationType, in checkDeclaredAnnotation() 94 assertGetDeclaredAnnotation(constructor, annotationType, expectedAnnotationString); in checkDeclaredAnnotation() 119 Class<? extends Annotation> annotationType, in assertGetDeclaredAnnotationsByType() argument 123 constructor, annotationType, expectedAnnotationStrings); in assertGetDeclaredAnnotationsByType() 145 Class<? extends Annotation> annotationType, in assertGetAnnotationsByType() argument 149 constructor, annotationType, expectedAnnotationStrings); in assertGetAnnotationsByType()
|
D | MethodTest.java | 87 Class<?> c, String methodName, Class<? extends Annotation> annotationType, in checkDeclaredAnnotation() argument 92 assertIsAnnotationPresent(method, annotationType, expectedAnnotationString != null); in checkDeclaredAnnotation() 95 assertGetDeclaredAnnotation(method, annotationType, expectedAnnotationString); in checkDeclaredAnnotation() 123 Class<?> c, Class<? extends Annotation> annotationType, String methodName, in assertGetDeclaredAnnotationsByType() argument 127 method, annotationType, expectedAnnotationStrings); in assertGetDeclaredAnnotationsByType() 155 Class<?> c, Class<? extends Annotation> annotationType, in assertGetAnnotationsByType() argument 159 method, annotationType, expectedAnnotationStrings); in assertGetAnnotationsByType()
|
D | AnnotatedElementParameterTest.java | 271 Executable executable, Class<? extends Annotation> annotationType, in checkParameter0DeclaredAnnotation() argument 276 assertIsAnnotationPresent(parameter, annotationType, expectedAnnotationString != null); in checkParameter0DeclaredAnnotation() 279 assertGetDeclaredAnnotation(parameter, annotationType, expectedAnnotationString); in checkParameter0DeclaredAnnotation() 355 Executable executable, Class<? extends Annotation> annotationType, in checkParameter0GetDeclaredAnnotationsByType() argument 359 parameter, annotationType, expectedAnnotationStrings); in checkParameter0GetDeclaredAnnotationsByType() 435 Executable executable, Class<? extends Annotation> annotationType, in checkParameter0GetAnnotationsByType() argument 439 parameter, annotationType, expectedAnnotationStrings); in checkParameter0GetAnnotationsByType()
|
/libcore/luni/src/main/java/libcore/reflect/ |
D | AnnotationFactory.java | 58 …blic static AnnotationMember[] getElementsDescription(Class<? extends Annotation> annotationType) { in getElementsDescription() argument 60 AnnotationMember[] desc = cache.get(annotationType); in getElementsDescription() 65 if (!annotationType.isAnnotation()) { in getElementsDescription() 66 … throw new IllegalArgumentException("Type is not annotation: " + annotationType.getName()); in getElementsDescription() 68 Method[] declaredMethods = annotationType.getDeclaredMethods(); in getElementsDescription() 81 cache.put(annotationType, desc); in getElementsDescription() 92 …public static <A extends Annotation> A createAnnotation(Class<? extends Annotation> annotationType, in createAnnotation() argument 94 AnnotationFactory factory = new AnnotationFactory(annotationType, elements); in createAnnotation() 95 return (A) Proxy.newProxyInstance(annotationType.getClassLoader(), in createAnnotation() 96 new Class[]{annotationType}, factory); in createAnnotation()
|
/libcore/ojluni/src/main/java/java/lang/reflect/ |
D | Field.java | 850 private native <A extends Annotation> A getAnnotationNative(Class<A> annotationType); in getAnnotationNative() argument 864 @Override public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) { in isAnnotationPresent() argument 865 if (annotationType == null) { in isAnnotationPresent() 868 return isAnnotationPresentNative(annotationType); in isAnnotationPresent() 871 private native boolean isAnnotationPresentNative(Class<? extends Annotation> annotationType); in isAnnotationPresentNative() argument
|
D | AnnotatedElement.java | 351 if (annotationClass.equals(annotation.annotationType())) { in getDeclaredAnnotation()
|
D | Executable.java | 637 public final boolean isAnnotationPresent(Class<? extends Annotation> annotationType) { in isAnnotationPresent() argument 638 Objects.requireNonNull(annotationType); in isAnnotationPresent() 639 return isAnnotationPresentNative(annotationType); in isAnnotationPresent() 642 private native boolean isAnnotationPresentNative(Class<? extends Annotation> annotationType); in isAnnotationPresentNative() argument
|
D | Parameter.java | 279 Executable executable, int parameterIndex, Class<A> annotationType); in getAnnotationNative() argument
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/ |
D | AccessibleObjectTest.java | 161 ignoreOrder.add(annotations[0].annotationType()); in test_getAnnotations() 162 ignoreOrder.add(annotations[1].annotationType()); in test_getAnnotations() 176 ignoreOrder.add(annotations[0].annotationType()); in test_getDeclaredAnnotations() 177 ignoreOrder.add(annotations[1].annotationType()); in test_getDeclaredAnnotations()
|
D | ConstructorTest.java | 115 ignoreOrder.add(paramAnnotations[0][0].annotationType()); in test_getParameterAnnotations() 116 ignoreOrder.add(paramAnnotations[0][1].annotationType()); in test_getParameterAnnotations() 132 ignoreOrder.add(annotations[0].annotationType()); in test_getDeclaredAnnotations() 133 ignoreOrder.add(annotations[1].annotationType()); in test_getDeclaredAnnotations()
|
D | MethodTest.java | 412 annotationSet.add(annotations[0][0].annotationType()); in test_getParameterAnnotations() 413 annotationSet.add(annotations[0][1].annotationType()); in test_getParameterAnnotations() 423 annotationSet.add(annotations[1][0].annotationType()); in test_getParameterAnnotations() 440 annotationSet.add(declaredAnnotations[0].annotationType()); in test_getDeclaredAnnotations() 441 annotationSet.add(declaredAnnotations[1].annotationType()); in test_getDeclaredAnnotations()
|
D | FieldTest.java | 1536 ignoreOrder.add(annotations[0].annotationType()); in test_getDeclaredAnnotations() 1537 ignoreOrder.add(annotations[1].annotationType()); in test_getDeclaredAnnotations()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/annotation/tests/java/lang/annotation/ |
D | IncompleteAnnotationExceptionTest.java | 55 assertSame("wrong annotation type", clazz, e.annotationType()); in test_constructorLjava_lang_Class_Ljava_lang_String()
|
/libcore/test-rules/src/main/java/libcore/junit/junit3/ |
D | TestCaseWithRules.java | 88 public <T extends Annotation> T getAnnotation(Class<T> annotationType) { in runBare()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | OldClassTest.java | 239 assertEquals(TestAnnotation.class, annotations[0].annotationType()); in test_getAnnotations() 245 Class<? extends Annotation> type = annotations[i].annotationType(); in test_getAnnotations()
|
/libcore/ojluni/src/main/java/java/lang/ |
D | Class.java | 2572 map.put(declaredAnnotation.annotationType(), declaredAnnotation); in getAnnotations() 2576 Class<? extends Annotation> clazz = declaredAnnotation.annotationType(); in getAnnotations()
|
/libcore/luni/src/test/java/org/apache/harmony/annotation/tests/java/lang/annotation/ |
D | AnnotationTest.java | 39 assertEquals(TestAnnotation1.class, anno.annotationType()); in test_annotationType()
|