Home
last modified time | relevance | path

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

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DAnnotationTest.java20 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()
DAttributedCharacterIteratorAttributeTest.java29 import java.text.Annotation;
/libcore/luni/src/main/java/java/lang/reflect/
DAnnotatedElement.java20 import java.lang.annotation.Annotation;
40 <T extends Annotation> T getAnnotation(Class<T> annotationType); in getAnnotation()
49 Annotation[] getAnnotations(); in getAnnotations()
58 Annotation[] getDeclaredAnnotations(); in getDeclaredAnnotations()
70 boolean isAnnotationPresent(Class<? extends Annotation> annotationType); in isAnnotationPresent()
/libcore/libart/src/main/java/java/lang/reflect/
DAccessibleObject.java35 import java.lang.annotation.Annotation;
87 @Override public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) { in isAnnotationPresent()
91 @Override public Annotation[] getDeclaredAnnotations() { in getDeclaredAnnotations()
95 @Override public Annotation[] getAnnotations() { in getAnnotations()
100 @Override public <T extends Annotation> T getAnnotation(Class<T> annotationType) { in getAnnotation()
DConstructor.java36 import java.lang.annotation.Annotation;
55 public Annotation[] getAnnotations() { in getAnnotations()
184 @Override public Annotation[] getDeclaredAnnotations() { in getDeclaredAnnotations()
185 List<Annotation> result = AnnotationAccess.getDeclaredAnnotations(this); in getDeclaredAnnotations()
186 return result.toArray(new Annotation[result.size()]); in getDeclaredAnnotations()
189 @Override public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) { in isAnnotationPresent()
196 @Override public <A extends Annotation> A getAnnotation(Class<A> annotationType) { in getAnnotation()
211 public Annotation[][] getParameterAnnotations() { in getParameterAnnotations()
DMethod.java36 import java.lang.annotation.Annotation;
82 public Annotation[] getAnnotations() { in getAnnotations()
249 @Override public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) { in isAnnotationPresent()
291 @Override public Annotation[] getDeclaredAnnotations() { in getDeclaredAnnotations()
292 List<Annotation> result = AnnotationAccess.getDeclaredAnnotations(this); in getDeclaredAnnotations()
293 return result.toArray(new Annotation[result.size()]); in getDeclaredAnnotations()
296 @Override public <A extends Annotation> A getAnnotation(Class<A> annotationType) { in getAnnotation()
311 public Annotation[][] getParameterAnnotations() { in getParameterAnnotations()
DAbstractMethod.java36 import java.lang.annotation.Annotation;
77 public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { in getAnnotation()
197 @Override public Annotation[] getDeclaredAnnotations() { in getDeclaredAnnotations()
198 List<Annotation> result = AnnotationAccess.getDeclaredAnnotations(this); in getDeclaredAnnotations()
199 return result.toArray(new Annotation[result.size()]); in getDeclaredAnnotations()
202 @Override public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) { in isAnnotationPresent()
209 public Annotation[] getAnnotations() { in getAnnotations()
221 public abstract Annotation[][] getParameterAnnotations(); in getParameterAnnotations()
DField.java36 import java.lang.annotation.Annotation;
243 @Override public Annotation[] getDeclaredAnnotations() { in getDeclaredAnnotations()
244 List<Annotation> result = AnnotationAccess.getDeclaredAnnotations(this); in getDeclaredAnnotations()
245 return result.toArray(new Annotation[result.size()]); in getDeclaredAnnotations()
248 @Override public <A extends Annotation> A getAnnotation(Class<A> annotationType) { in getAnnotation()
255 @Override public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) { in isAnnotationPresent()
/libcore/luni/src/main/java/libcore/reflect/
DAnnotationAccess.java25 import java.lang.annotation.Annotation;
66 public static <A extends java.lang.annotation.Annotation> A getAnnotation( in getAnnotation()
94 private static boolean isInherited(Class<? extends Annotation> annotationType) { in isInherited()
98 public static Annotation[] getAnnotations(Class<?> c) { in getAnnotations()
110 HashMap<Class<?>, Annotation> map = new HashMap<Class<?>, Annotation>(); in getAnnotations()
111 for (Annotation declaredAnnotation : getDeclaredAnnotations(c)) { in getAnnotations()
115 for (Annotation declaredAnnotation : getDeclaredAnnotations(sup)) { in getAnnotations()
116 Class<? extends Annotation> clazz = declaredAnnotation.annotationType(); in getAnnotations()
124 Collection<Annotation> coll = map.values(); in getAnnotations()
125 return coll.toArray(new Annotation[coll.size()]); in getAnnotations()
[all …]
DAnnotationFactory.java23 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/luni/src/main/java/java/lang/
DPackage.java36 import java.lang.annotation.Annotation;
52 private static final Annotation[] NO_ANNOTATIONS = new Annotation[0];
88 public <A extends Annotation> A getAnnotation(Class<A> annotationType) { in getAnnotation()
89 for (Annotation annotation : getAnnotations()) { in getAnnotation()
100 public Annotation[] getAnnotations() { in getAnnotations()
114 public Annotation[] getDeclaredAnnotations() { in getDeclaredAnnotations()
127 public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) { in isAnnotationPresent()
/libcore/dex/src/main/java/com/android/dex/
DAnnotation.java24 public final class Annotation implements Comparable<Annotation> { class
29 public Annotation(Dex dex, byte visibility, EncodedValue encodedAnnotation) { in Annotation() method in Annotation
54 @Override public int compareTo(Annotation other) { in compareTo()
DDex.java767 public Annotation readAnnotation() { in readAnnotation()
771 return new Annotation(Dex.this, visibility, new EncodedValue(getBytesFrom(start))); in readAnnotation()
/libcore/luni/src/main/java/java/lang/annotation/
DIncompleteAnnotationException.java31 private Class<? extends Annotation> annotationType;
44 public IncompleteAnnotationException(Class<? extends Annotation> annotationType, in IncompleteAnnotationException()
57 public Class<? extends Annotation> annotationType() { in annotationType()
DAnnotation.java28 public interface Annotation { interface
35 Class<? extends Annotation> annotationType(); in annotationType()
/libcore/luni/src/main/java/java/text/
DAnnotation.java37 public class Annotation { class
47 public Annotation(Object attribute) { in Annotation() method in Annotation
DAttributedString.java155 if (!(range.value instanceof Annotation)) { in inRange()
167 return !(range.value instanceof Annotation) in inRange()
170 return !(range.value instanceof Annotation) in inRange()
451 if ((value instanceof Annotation && runStart >= start && limit <= end) in AttributedString()
452 || (value != null && !(value instanceof Annotation))) { in AttributedString()
/libcore/luni/src/test/java/libcore/java/lang/reflect/
DAnnotationsTest.java20 import java.lang.annotation.Annotation;
64 Annotation[][] noParameterAnnotations = method.getParameterAnnotations(); in testParameterAnnotations()
70 Annotation[][] parameterAnnotations = parameters.getParameterAnnotations(); in testParameterAnnotations()
359 AnnotatedElement element, Class<? extends Annotation>... expectedAnnotations) { in assertAnnotatedElement()
360 Set<Class<? extends Annotation>> actualTypes = annotationsToTypes(element.getAnnotations()); in assertAnnotatedElement()
361 Set<Class<? extends Annotation>> expectedTypes = set(expectedAnnotations); in assertAnnotatedElement()
382 private Set<Class<? extends Annotation>> annotationsToTypes(Annotation[] annotations) { in annotationsToTypes()
383 Set<Class<? extends Annotation>> result = new HashSet<Class<? extends Annotation>>(); in annotationsToTypes()
384 for (Annotation annotation : annotations) { in annotationsToTypes()
391 Class<? extends Annotation> annotation) { in assertPresent()
/libcore/luni/src/test/java/org/apache/harmony/annotation/tests/java/lang/annotation/
DAnnotationTest.java22 import java.lang.annotation.Annotation;
36 Annotation [] annotations = AnnotatedClass.class.getDeclaredAnnotations(); in test_annotationType()
38 Annotation anno = annotations[0]; in test_annotationType()
75 Annotation a1 = me1.getDeclaredAnnotations()[0]; in test_equals()
76 Annotation a2 = me2.getDeclaredAnnotations()[0]; in test_equals()
88 Annotation a1 = me1.getDeclaredAnnotations()[0]; in test_equals()
89 Annotation a2 = me2.getDeclaredAnnotations()[0]; in test_equals()
103 Annotation a1 = AnnotatedClass.class.getDeclaredAnnotations()[0]; in test_hashCode()
133Annotation[][] annotations = c.getDeclaredMethod("test35304_method", parameterTypes).getParameterA… in test35304()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/
DAccessibleObjectTest.java20 import java.lang.annotation.Annotation;
157 Annotation[] annotations = ao.getAnnotations(); in test_getAnnotations()
172 Annotation[] annotations = ao.getDeclaredAnnotations(); in test_getDeclaredAnnotations()
DConstructorTest.java20 import java.lang.annotation.Annotation;
108 Annotation[][] paramAnnotations = ctor1.getParameterAnnotations(); in test_getParameterAnnotations()
128 Annotation[] annotations = ctor1.getDeclaredAnnotations(); in test_getDeclaredAnnotations()
DMethodTest.java20 import java.lang.annotation.Annotation;
406 Annotation[][] annotations = method.getParameterAnnotations(); in test_getParameterAnnotations()
436 Annotation[] declaredAnnotations = method.getDeclaredAnnotations(); in test_getDeclaredAnnotations()
DFieldTest.java22 import java.lang.annotation.Annotation;
1532 Annotation[] annotations = field.getDeclaredAnnotations(); in test_getDeclaredAnnotations()
/libcore/libart/src/main/java/java/lang/
DClass.java39 import java.lang.annotation.Annotation;
358 @Override public <A extends Annotation> A getAnnotation(Class<A> annotationType) { in getAnnotation()
368 @Override public Annotation[] getAnnotations() { in getAnnotations()
742 @Override public Annotation[] getDeclaredAnnotations() { in getDeclaredAnnotations()
743 List<Annotation> result = AnnotationAccess.getDeclaredAnnotations(this); in getDeclaredAnnotations()
744 return result.toArray(new Annotation[result.size()]); in getDeclaredAnnotations()
1227 @Override public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) { in isAnnotationPresent()
/libcore/luni/src/test/java/libcore/java/lang/
DOldClassTest.java23 import java.lang.annotation.Annotation;
237 Annotation [] annotations = PublicTestClass.class.getAnnotations(); in test_getAnnotations()
245 Class<? extends Annotation> type = annotations[i].annotationType(); in test_getAnnotations()
356 Annotation [] annotations = PublicTestClass.class.getDeclaredAnnotations(); in test_getDeclaredAnnotations()