/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | AnnotationTest.java | 20 import java.text.Annotation; 27 assertNotNull(new Annotation(null)); in testAnnotation() 28 assertNotNull(new Annotation("value")); in testAnnotation() 32 Annotation a = new Annotation(null); in testGetValue() 34 a = new Annotation("value"); in testGetValue() 39 Annotation ant = new Annotation("HelloWorld"); in testToString() 42 assertNotNull(new Annotation(null).toString()); in testToString() 43 assertNotNull(new Annotation("value").toString()); in testToString()
|
/libcore/luni/src/test/java/libcore/java/lang/reflect/annotations/ |
D | AnnotatedElementTestSupport.java | 19 import java.lang.annotation.Annotation; 107 AnnotatedElement element, Class<? extends Annotation>... expectedAnnotations) { in checkAnnotatedElementPresentMethods() 108 Set<Class<? extends Annotation>> actualTypes = annotationsToTypes(element.getAnnotations()); in checkAnnotatedElementPresentMethods() 109 Set<Class<? extends Annotation>> expectedTypes = set(expectedAnnotations); in checkAnnotatedElementPresentMethods() 146 Class<? extends Annotation>... expectedDeclaredAnnotations) { in checkAnnotatedElementDirectMethods() 147 …Set<Class<? extends Annotation>> actualTypes = annotationsToTypes(element.getDeclaredAnnotations()… in checkAnnotatedElementDirectMethods() 148 Set<Class<? extends Annotation>> expectedTypes = set(expectedDeclaredAnnotations); in checkAnnotatedElementDirectMethods() 166 static Set<Class<? extends Annotation>> annotationsToTypes(Annotation[] annotations) { in annotationsToTypes() 167 Set<Class<? extends Annotation>> result = new HashSet<Class<? extends Annotation>>(); in annotationsToTypes() 168 for (Annotation annotation : annotations) { in annotationsToTypes() [all …]
|
D | ConstructorTest.java | 21 import java.lang.annotation.Annotation; 69 Class<? extends Annotation> repeated = Repeated.class; in testDeclaredAnnotation() 76 Class<? extends Annotation> container = Container.class; in testDeclaredAnnotation() 85 Class<? extends Annotation> annotationType, in checkDeclaredAnnotation() 100 Class<? extends Annotation> repeated = Repeated.class; in testGetDeclaredAnnotationsByType() 108 Class<? extends Annotation> container = Container.class; in testGetDeclaredAnnotationsByType() 119 Class<? extends Annotation> annotationType, in assertGetDeclaredAnnotationsByType() 129 Class<? extends Annotation> repeated = Repeated.class; in testGetAnnotationsByType() 136 Class<? extends Annotation> container = Container.class; in testGetAnnotationsByType() 145 Class<? extends Annotation> annotationType, in assertGetAnnotationsByType()
|
D | MethodTest.java | 21 import java.lang.annotation.Annotation; 68 Class<? extends Annotation> repeated = Repeated.class; in testDeclaredAnnotation() 75 Class<? extends Annotation> container = Container.class; in testDeclaredAnnotation() 87 Class<?> c, String methodName, Class<? extends Annotation> annotationType, in checkDeclaredAnnotation() 101 Class<? extends Annotation> repeated = Repeated.class; in testGetDeclaredAnnotationsByType() 111 Class<? extends Annotation> container = Container.class; in testGetDeclaredAnnotationsByType() 123 Class<?> c, Class<? extends Annotation> annotationType, String methodName, in assertGetDeclaredAnnotationsByType() 133 Class<? extends Annotation> repeated = Repeated.class; in testGetAnnotationsByType() 143 Class<? extends Annotation> container = Container.class; in testGetAnnotationsByType() 155 Class<?> c, Class<? extends Annotation> annotationType, in assertGetAnnotationsByType()
|
D | FieldTest.java | 21 import java.lang.annotation.Annotation; 68 Class<? extends Annotation> repeated = Repeated.class; in testDeclaredAnnotation() 75 Class<? extends Annotation> container = Container.class; in testDeclaredAnnotation() 87 Class<?> c, String fieldName, Class<? extends Annotation> annotationType, in checkDeclaredAnnotation() 101 Class<? extends Annotation> repeated = Repeated.class; in testGetDeclaredAnnotationsByType() 111 Class<? extends Annotation> container = Container.class; in testGetDeclaredAnnotationsByType() 123 Class<?> c, Class<? extends Annotation> annotationType, String fieldName, in assertGetDeclaredAnnotationsByType() 133 Class<? extends Annotation> repeated = Repeated.class; in testGetAnnotationsByType() 143 Class<? extends Annotation> container = Container.class; in testGetAnnotationsByType() 155 Class<?> c, Class<? extends Annotation> annotationType, in assertGetAnnotationsByType()
|
D | RetentionPolicyTest.java | 24 import java.lang.annotation.Annotation; 84 private Class<? extends Annotation> getAnnotationClass(String name) throws Exception { in getAnnotationClass() 85 return (Class<? extends Annotation>) classLoader.loadClass(name); in getAnnotationClass() 96 Class<? extends Annotation> annotationClass = getAnnotationClass( in testRetentionPolicy_targetSdkVersion_23() 99 Annotation classRetentionAnnotation = in testRetentionPolicy_targetSdkVersion_23() 109 Class<? extends Annotation> annotationClass = getAnnotationClass( in testRetentionPolicy_targetSdkVersion_24() 111 Annotation classRetentionAnnotation = in testRetentionPolicy_targetSdkVersion_24()
|
D | ExecutableParameterTest.java | 21 import java.lang.annotation.Annotation; 55 Annotation[][] noParameterAnnotations = getParameterAnnotations( in testMethodGetParameterAnnotations() 62 Annotation[][] parameterAnnotations = getParameterAnnotations( in testMethodGetParameterAnnotations() 158 Annotation[][] noParameterAnnotations = getParameterAnnotations( in testConstructorGetParameterAnnotations() 165 Annotation[][] parameterAnnotations = getParameterAnnotations( in testConstructorGetParameterAnnotations() 240 Annotation[][] annotations = getParameterAnnotations(constructor, 2); in testImplicitConstructorParameters_innerClass() 261 Annotation[][] annotations = getParameterAnnotations(constructor, 2); in testImplicitConstructorParameters_anonymousClass() 281 Annotation[][] annotations = getParameterAnnotations(constructor, 1); in testImplicitConstructorParameters_staticInnerClass() 287 Annotation[][] allAnnotations = getParameterAnnotations(executable, 1); in assertOnlyParameterAnnotations() 289 Annotation[] p0Annotations = allAnnotations[0]; in assertOnlyParameterAnnotations() [all …]
|
D | AnnotatedElementParameterTest.java | 21 import java.lang.annotation.Annotation; 159 Class<? extends Annotation> repeated = Repeated.class; in testMethodDeclaredAnnotation_repeated() 182 Class<? extends Annotation> container = Container.class; in testMethodDeclaredAnnotation_repeated() 236 Class<? extends Annotation> repeated = Repeated.class; in testConstructorDeclaredAnnotation_repeated() 253 Class<? extends Annotation> container = Container.class; in testConstructorDeclaredAnnotation_repeated() 272 Executable executable, Class<? extends Annotation> annotationType, in checkParameter0DeclaredAnnotation() 284 Class<? extends Annotation> repeated = Repeated.class; in testMethodGetDeclaredAnnotationsByType_repeated() 301 Class<? extends Annotation> container = Container.class; in testMethodGetDeclaredAnnotationsByType_repeated() 320 Class<? extends Annotation> repeated = Repeated.class; in testConstructorGetDeclaredAnnotationsByType_repeated() 337 Class<? extends Annotation> container = Container.class; in testConstructorGetDeclaredAnnotationsByType_repeated() [all …]
|
/libcore/ojluni/src/main/java/java/lang/reflect/ |
D | AnnotatedElement.java | 29 import java.lang.annotation.Annotation; 252 default boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) { in isAnnotationPresent() 268 <T extends Annotation> T getAnnotation(Class<T> annotationClass); in getAnnotation() 282 Annotation[] getAnnotations(); in getAnnotations() 319 default <T extends Annotation> T[] getAnnotationsByType(Class<T> annotationClass) { in getAnnotationsByType() 351 default <T extends Annotation> T getDeclaredAnnotation(Class<T> annotationClass) { in getDeclaredAnnotation() 354 for (Annotation annotation : getDeclaredAnnotations()) { in getDeclaredAnnotation() 408 default <T extends Annotation> T[] getDeclaredAnnotationsByType(Class<T> annotationClass) { in getDeclaredAnnotationsByType() 428 Annotation[] getDeclaredAnnotations(); in getDeclaredAnnotations()
|
D | AccessibleObject.java | 29 import java.lang.annotation.Annotation; 200 public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { in getAnnotation() 210 public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) { in isAnnotationPresent() 219 public <T extends Annotation> T[] getAnnotationsByType(Class<T> annotationClass) { in getAnnotationsByType() 226 public Annotation[] getAnnotations() { in getAnnotations() 235 public <T extends Annotation> T getDeclaredAnnotation(Class<T> annotationClass) { in getDeclaredAnnotation() 247 public <T extends Annotation> T[] getDeclaredAnnotationsByType(Class<T> annotationClass) { in getDeclaredAnnotationsByType() 257 public Annotation[] getDeclaredAnnotations() { in getDeclaredAnnotations()
|
D | Parameter.java | 275 public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { in getAnnotation() 282 private static native <A extends Annotation> A getAnnotationNative( in getAnnotationNative() 290 public <T extends Annotation> T[] getAnnotationsByType(Class<T> annotationClass) { in getAnnotationsByType() 298 public Annotation[] getDeclaredAnnotations() { in getDeclaredAnnotations() 305 public <T extends Annotation> T getDeclaredAnnotation(Class<T> annotationClass) { in getDeclaredAnnotation() 316 public <T extends Annotation> T[] getDeclaredAnnotationsByType(Class<T> annotationClass) { in getDeclaredAnnotationsByType() 326 public Annotation[] getAnnotations() { in getAnnotations()
|
D | Executable.java | 30 import java.lang.annotation.Annotation; 532 public abstract Annotation[][] getParameterAnnotations(); in getParameterAnnotations() 538 public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { in getAnnotation() 546 private native <T extends Annotation> T getAnnotationNative(Class<T> annotationClass); in getAnnotationNative() 553 public <T extends Annotation> T[] getAnnotationsByType(Class<T> annotationClass) { in getAnnotationsByType() 561 public Annotation[] getDeclaredAnnotations() { in getDeclaredAnnotations() 568 private native Annotation[] getDeclaredAnnotationsNative(); in getDeclaredAnnotationsNative() 645 public final boolean isAnnotationPresent(Class<? extends Annotation> annotationType) { in isAnnotationPresent() 650 private native boolean isAnnotationPresentNative(Class<? extends Annotation> annotationType); in isAnnotationPresentNative() 652 final Annotation[][] getParameterAnnotationsInternal() { in getParameterAnnotationsInternal() [all …]
|
D | Field.java | 31 import java.lang.annotation.Annotation; 895 public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { in getAnnotation() 902 private native <A extends Annotation> A getAnnotationNative(Class<A> annotationType); in getAnnotationNative() 910 public <T extends Annotation> T[] getAnnotationsByType(Class<T> annotationClass) { in getAnnotationsByType() 917 public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) { in isAnnotationPresent() 924 private native boolean isAnnotationPresentNative(Class<? extends Annotation> annotationType); in isAnnotationPresentNative() 932 public native Annotation[] getDeclaredAnnotations(); in getDeclaredAnnotations()
|
/libcore/ojluni/annotations/sdk/nullability/java/lang/reflect/ |
D | AnnotatedElement.annotated.java | 31 import java.lang.annotation.Annotation; 36 …t(@libcore.util.NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass… in isAnnotationPresent() 38 @libcore.util.Nullable public <T extends java.lang.annotation.Annotation> T getAnnotation(@libcore.… in getAnnotation() 40 public java.lang.annotation.@libcore.util.NonNull Annotation @libcore.util.NonNull [] getAnnotation… in getAnnotations() 42 public default <T extends java.lang.annotation.Annotation> T[] getAnnotationsByType(@libcore.util.N… in getAnnotationsByType() 44 @libcore.util.Nullable public default <T extends java.lang.annotation.Annotation> T getDeclaredAnno… in getDeclaredAnnotation() 46 public default <T extends java.lang.annotation.Annotation> T[] getDeclaredAnnotationsByType(@libcor… in getDeclaredAnnotationsByType() 48 public java.lang.annotation.@libcore.util.NonNull Annotation @libcore.util.NonNull [] getDeclaredAn… in getDeclaredAnnotations()
|
D | AccessibleObject.annotated.java | 42 @libcore.util.Nullable public <T extends java.lang.annotation.Annotation> T getAnnotation(@libcore.… in getAnnotation() 44 …t(@libcore.util.NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass… in isAnnotationPresent() 46 public <T extends java.lang.annotation.Annotation> T[] getAnnotationsByType(@libcore.util.NonNull j… in getAnnotationsByType() 48 public java.lang.annotation.@libcore.util.NonNull Annotation @libcore.util.NonNull [] getAnnotation… in getAnnotations() 50 @libcore.util.Nullable public <T extends java.lang.annotation.Annotation> T getDeclaredAnnotation(@… in getDeclaredAnnotation() 52 public <T extends java.lang.annotation.Annotation> T[] getDeclaredAnnotationsByType(@libcore.util.N… in getDeclaredAnnotationsByType() 54 public java.lang.annotation.@libcore.util.NonNull Annotation @libcore.util.NonNull [] getDeclaredAn… in getDeclaredAnnotations()
|
D | Parameter.annotated.java | 59 @libcore.util.Nullable public <T extends java.lang.annotation.Annotation> T getAnnotation(@libcore.… in getAnnotation() 61 public <T extends java.lang.annotation.Annotation> T[] getAnnotationsByType(@libcore.util.NonNull j… in getAnnotationsByType() 63 public java.lang.annotation.@libcore.util.NonNull Annotation @libcore.util.NonNull [] getDeclaredAn… in getDeclaredAnnotations() 65 @libcore.util.Nullable public <T extends java.lang.annotation.Annotation> T getDeclaredAnnotation(@… in getDeclaredAnnotation() 67 public <T extends java.lang.annotation.Annotation> T[] getDeclaredAnnotationsByType(@libcore.util.N… in getDeclaredAnnotationsByType() 69 public java.lang.annotation.@libcore.util.NonNull Annotation @libcore.util.NonNull [] getAnnotation… in getAnnotations()
|
D | Executable.annotated.java | 29 import java.lang.annotation.Annotation; 62 public abstract java.lang.annotation.@libcore.util.NonNull Annotation @libcore.util.NonNull [] @lib… in getParameterAnnotations() 64 @libcore.util.Nullable public <T extends java.lang.annotation.Annotation> T getAnnotation(@libcore.… in getAnnotation() 66 public <T extends java.lang.annotation.Annotation> T[] getAnnotationsByType(@libcore.util.NonNull j… in getAnnotationsByType() 68 public java.lang.annotation.@libcore.util.NonNull Annotation @libcore.util.NonNull [] getDeclaredAn… in getDeclaredAnnotations() 70 …t(@libcore.util.NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)… in isAnnotationPresent()
|
/libcore/ojluni/annotations/hiddenapi/java/lang/reflect/ |
D | AccessibleObject.java | 56 public <T extends java.lang.annotation.Annotation> T getAnnotation( in getAnnotation() 62 java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass) { in isAnnotationPresent() 66 public <T extends java.lang.annotation.Annotation> T[] getAnnotationsByType( in getAnnotationsByType() 71 public java.lang.annotation.Annotation[] getAnnotations() { in getAnnotations() 75 public <T extends java.lang.annotation.Annotation> T getDeclaredAnnotation( in getDeclaredAnnotation() 80 public <T extends java.lang.annotation.Annotation> T[] getDeclaredAnnotationsByType( in getDeclaredAnnotationsByType() 85 public java.lang.annotation.Annotation[] getDeclaredAnnotations() { in getDeclaredAnnotations()
|
D | Parameter.java | 94 public <T extends java.lang.annotation.Annotation> T getAnnotation( in getAnnotation() 99 private static native <A extends java.lang.annotation.Annotation> A getAnnotationNative( in getAnnotationNative() 104 public <T extends java.lang.annotation.Annotation> T[] getAnnotationsByType( in getAnnotationsByType() 109 public java.lang.annotation.Annotation[] getDeclaredAnnotations() { in getDeclaredAnnotations() 113 public <T extends java.lang.annotation.Annotation> T getDeclaredAnnotation( in getDeclaredAnnotation() 118 public <T extends java.lang.annotation.Annotation> T[] getDeclaredAnnotationsByType( in getDeclaredAnnotationsByType() 123 public java.lang.annotation.Annotation[] getAnnotations() { in getAnnotations()
|
D | Executable.java | 128 public abstract java.lang.annotation.Annotation[][] getParameterAnnotations(); in getParameterAnnotations() 130 public <T extends java.lang.annotation.Annotation> T getAnnotation( in getAnnotation() 135 private native <T extends java.lang.annotation.Annotation> T getAnnotationNative( in getAnnotationNative() 138 public <T extends java.lang.annotation.Annotation> T[] getAnnotationsByType( in getAnnotationsByType() 143 public java.lang.annotation.Annotation[] getDeclaredAnnotations() { in getDeclaredAnnotations() 147 private native java.lang.annotation.Annotation[] getDeclaredAnnotationsNative(); in getDeclaredAnnotationsNative() 166 java.lang.Class<? extends java.lang.annotation.Annotation> annotationType) { in isAnnotationPresent() 171 java.lang.Class<? extends java.lang.annotation.Annotation> annotationType); in isAnnotationPresentNative() 173 final java.lang.annotation.Annotation[][] getParameterAnnotationsInternal() { in getParameterAnnotationsInternal() 177 private native java.lang.annotation.Annotation[][] getParameterAnnotationsNative(); in getParameterAnnotationsNative()
|
/libcore/luni/src/main/java/libcore/reflect/ |
D | AnnotatedElements.java | 19 import java.lang.annotation.Annotation; 42 public static <T extends Annotation> T[] getDirectOrIndirectAnnotationsByType( in getDirectOrIndirectAnnotationsByType() 48 Annotation[] annotations = element.getDeclaredAnnotations(); in getDirectOrIndirectAnnotationsByType() 53 Class<? extends Annotation> repeatableAnnotationClass = in getDirectOrIndirectAnnotationsByType() 78 private static <T extends Annotation> void insertAnnotationValues(Annotation annotation, in insertAnnotationValues() 148 private static <T extends Annotation> Class<? extends Annotation>
|
D | AnnotationFactory.java | 23 import java.lang.annotation.Annotation; 51 private static final transient Map<Class<? extends Annotation>, AnnotationMember[]> cache = 52 new WeakHashMap<Class<? extends Annotation>, AnnotationMember[]>(); 58 …public static AnnotationMember[] getElementsDescription(Class<? extends Annotation> annotationType… in getElementsDescription() 92 …public static <A extends Annotation> A createAnnotation(Class<? extends Annotation> annotationType, in createAnnotation() 99 private final Class<? extends Annotation> klazz; 110 private AnnotationFactory(Class<? extends Annotation> klzz, AnnotationMember[] values) { in AnnotationFactory()
|
/libcore/ojluni/src/main/java/java/lang/annotation/ |
D | IncompleteAnnotationException.java | 44 private Class<? extends Annotation> annotationType; 56 Class<? extends Annotation> annotationType, in IncompleteAnnotationException() 72 public Class<? extends Annotation> annotationType() { in annotationType()
|
D | Annotation.java | 44 public interface Annotation { interface 135 Class<? extends Annotation> annotationType(); in annotationType()
|
/libcore/test-rules/src/main/java/libcore/junit/junit3/ |
D | TestCaseWithRules.java | 18 import java.lang.annotation.Annotation; 83 public Annotation[] getAnnotations() { in runBare() 84 return new Annotation[0]; in runBare() 88 public <T extends Annotation> T getAnnotation(Class<T> annotationType) { in runBare()
|