/libcore/ojluni/src/main/java/java/lang/annotation/ |
H A D | IncompleteAnnotationException.java | 44 private Class<? extends Annotation> annotationType; field in class:IncompleteAnnotationException 51 * @param annotationType the Class object for the annotation type 56 Class<? extends Annotation> annotationType, 58 super(annotationType.getName() + " missing element " + 61 this.annotationType = annotationType; 72 public Class<? extends Annotation> annotationType() { method in class:IncompleteAnnotationException 73 return annotationType; 55 IncompleteAnnotationException( Class<? extends Annotation> annotationType, String elementName) argument
|
H A D | Annotation.java | 135 Class<? extends Annotation> annotationType(); method in interface:Annotation
|
/libcore/luni/src/test/java/libcore/java/lang/reflect/annotations/ |
H A D | PackageTest.java | 57 Class<?> classInPackage, Class<? extends Annotation> annotationType, 62 assertIsAnnotationPresent(aPackage, annotationType, expectedAnnotationString != null); 65 assertGetDeclaredAnnotation(aPackage, annotationType, expectedAnnotationString); 93 Class<?> classInPackage, Class<? extends Annotation> annotationType, 97 aPackage, annotationType, expectedAnnotationStrings); 123 Class<? extends Annotation> annotationType, 127 aPackage, annotationType, expectedAnnotationStrings); 56 checkDeclaredAnnotation( Class<?> classInPackage, Class<? extends Annotation> annotationType, String expectedAnnotationString) argument 92 assertGetDeclaredAnnotationsByType( Class<?> classInPackage, Class<? extends Annotation> annotationType, String... expectedAnnotationStrings) argument 122 assertGetAnnotationsByType(Class<?> classInPackage, Class<? extends Annotation> annotationType, String... expectedAnnotationStrings) argument
|
H A D | ConstructorTest.java | 85 Class<? extends Annotation> annotationType, 90 assertIsAnnotationPresent(constructor, annotationType, 94 assertGetDeclaredAnnotation(constructor, annotationType, expectedAnnotationString); 119 Class<? extends Annotation> annotationType, 123 constructor, annotationType, expectedAnnotationStrings); 145 Class<? extends Annotation> annotationType, 149 constructor, annotationType, expectedAnnotationStrings); 84 checkDeclaredAnnotation(Class<?> c, int constructorArgCount, Class<? extends Annotation> annotationType, String expectedAnnotationString) argument 118 assertGetDeclaredAnnotationsByType(Class<?> c, int constructorArgCount, Class<? extends Annotation> annotationType, String... expectedAnnotationStrings) argument 144 assertGetAnnotationsByType(Class<?> c, int constructorArgCount, Class<? extends Annotation> annotationType, String... expectedAnnotationStrings) argument
|
H A D | FieldTest.java | 87 Class<?> c, String fieldName, Class<? extends Annotation> annotationType, 92 assertIsAnnotationPresent(field, annotationType, expectedAnnotationString != null); 95 assertGetDeclaredAnnotation(field, annotationType, expectedAnnotationString); 123 Class<?> c, Class<? extends Annotation> annotationType, String fieldName, 127 field, annotationType, expectedAnnotationStrings); 155 Class<?> c, Class<? extends Annotation> annotationType, 159 field, annotationType, expectedAnnotationStrings); 86 checkDeclaredAnnotation( Class<?> c, String fieldName, Class<? extends Annotation> annotationType, String expectedAnnotationString) argument 122 assertGetDeclaredAnnotationsByType( Class<?> c, Class<? extends Annotation> annotationType, String fieldName, String... expectedAnnotationStrings) argument 154 assertGetAnnotationsByType( Class<?> c, Class<? extends Annotation> annotationType, String fieldName, String... expectedAnnotationStrings) argument
|
H A D | MethodTest.java | 87 Class<?> c, String methodName, Class<? extends Annotation> annotationType, 92 assertIsAnnotationPresent(method, annotationType, expectedAnnotationString != null); 95 assertGetDeclaredAnnotation(method, annotationType, expectedAnnotationString); 123 Class<?> c, Class<? extends Annotation> annotationType, String methodName, 127 method, annotationType, expectedAnnotationStrings); 155 Class<?> c, Class<? extends Annotation> annotationType, 159 method, annotationType, expectedAnnotationStrings); 86 checkDeclaredAnnotation( Class<?> c, String methodName, Class<? extends Annotation> annotationType, String expectedAnnotationString) argument 122 assertGetDeclaredAnnotationsByType( Class<?> c, Class<? extends Annotation> annotationType, String methodName, String... expectedAnnotationStrings) argument 154 assertGetAnnotationsByType( Class<?> c, Class<? extends Annotation> annotationType, String methodName, String... expectedAnnotationStrings) argument
|
H A D | AnnotatedElementParameterTest.java | 272 Executable executable, Class<? extends Annotation> annotationType, 277 assertIsAnnotationPresent(parameter, annotationType, expectedAnnotationString != null); 280 assertGetDeclaredAnnotation(parameter, annotationType, expectedAnnotationString); 356 Executable executable, Class<? extends Annotation> annotationType, 360 parameter, annotationType, expectedAnnotationStrings); 436 Executable executable, Class<? extends Annotation> annotationType, 440 parameter, annotationType, expectedAnnotationStrings); 271 checkParameter0DeclaredAnnotation( Executable executable, Class<? extends Annotation> annotationType, String expectedAnnotationString) argument 355 checkParameter0GetDeclaredAnnotationsByType( Executable executable, Class<? extends Annotation> annotationType, String... expectedAnnotationStrings) argument 435 checkParameter0GetAnnotationsByType( Executable executable, Class<? extends Annotation> annotationType, String... expectedAnnotationStrings) argument
|
H A D | AnnotatedElementTestSupport.java | 163 * Extracts the annotation types ({@link Annotation#annotationType()} from the supplied 169 result.add(annotation.annotationType()); 203 AnnotatedElement element, Class<? extends Annotation> annotationType, 205 assertEquals("element.isAnnotationPresent() for " + element + " and " + annotationType, 206 expected, element.isAnnotationPresent(annotationType)); 215 Class<? extends Annotation> annotationType, String expectedAnnotationString) { 216 Annotation annotation = annotatedElement.getDeclaredAnnotation(annotationType); 226 AnnotatedElement annotatedElement, Class<? extends Annotation> annotationType, 228 Annotation[] annotations = annotatedElement.getDeclaredAnnotationsByType(annotationType); 238 Class<? extends Annotation> annotationType, Strin 202 assertIsAnnotationPresent( AnnotatedElement element, Class<? extends Annotation> annotationType, boolean expected) argument 214 assertGetDeclaredAnnotation(AnnotatedElement annotatedElement, Class<? extends Annotation> annotationType, String expectedAnnotationString) argument 225 assertGetDeclaredAnnotationsByType( AnnotatedElement annotatedElement, Class<? extends Annotation> annotationType, String[] expectedAnnotationStrings) argument 237 assertGetAnnotationsByType(AnnotatedElement annotatedElement, Class<? extends Annotation> annotationType, String[] expectedAnnotationStrings) argument [all...] |
/libcore/luni/src/main/java/libcore/reflect/ |
H A D | AnnotationFactory.java | 58 public static AnnotationMember[] getElementsDescription(Class<? extends Annotation> annotationType) { argument 60 AnnotationMember[] desc = cache.get(annotationType); 65 if (!annotationType.isAnnotation()) { 66 throw new IllegalArgumentException("Type is not annotation: " + annotationType.getName()); 68 Method[] declaredMethods = annotationType.getDeclaredMethods(); 81 cache.put(annotationType, desc); 88 * @param annotationType the annotation type definition 92 public static <A extends Annotation> A createAnnotation(Class<? extends Annotation> annotationType, argument 94 AnnotationFactory factory = new AnnotationFactory(annotationType, elements); 95 return (A) Proxy.newProxyInstance(annotationType [all...] |
/libcore/ojluni/src/main/java/java/lang/reflect/ |
H A D | Parameter.java | 283 Executable executable, int parameterIndex, Class<A> annotationType); 282 getAnnotationNative( Executable executable, int parameterIndex, Class<A> annotationType) argument
|
H A D | Field.java | 897 private native <A extends Annotation> A getAnnotationNative(Class<A> annotationType); argument 912 public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) { argument 913 if (annotationType == null) { 914 throw new NullPointerException("annotationType == null"); 916 return isAnnotationPresentNative(annotationType); 919 private native boolean isAnnotationPresentNative(Class<? extends Annotation> annotationType); argument
|
H A D | Executable.java | 645 public final boolean isAnnotationPresent(Class<? extends Annotation> annotationType) { argument 646 Objects.requireNonNull(annotationType); 647 return isAnnotationPresentNative(annotationType); 650 private native boolean isAnnotationPresentNative(Class<? extends Annotation> annotationType); argument
|