Home | History | Annotate | Download | only in lang

Lines Matching defs:ANNOTATION

29 import dalvik.annotation.optimization.FastNative;
33 import java.lang.annotation.Annotation;
34 import java.lang.annotation.Inherited;
66 * class and an annotation is a kind of interface. Every array also
112 private static final int ANNOTATION= 0x00002000;
316 if (isInterface()) { // Note: all annotation types are interfaces
666 * Returns true if this {@code Class} object represents an annotation
668 * would also return true, as all annotation types are also interfaces.
670 * @return {@code true} if this class object represents an annotation
675 return (getModifiers() & ANNOTATION) != 0;
1224 // the system annotation to match. See http://b/28800927.
2476 public <A extends Annotation> A getAnnotation(Class<A> annotationClass) {
2479 A annotation = getDeclaredAnnotation(annotationClass);
2480 if (annotation != null) {
2481 return annotation;
2486 annotation = sup.getDeclaredAnnotation(annotationClass);
2487 if (annotation != null) {
2488 return annotation;
2502 public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) {
2527 public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationClass) {
2537 // * The annotation class was marked with @Inherited.
2558 public Annotation[] getAnnotations() {
2561 * annotations from superclasses that have the "@Inherited" annotation
2570 HashMap<Class<?>, Annotation> map = new HashMap<Class<?>, Annotation>();
2571 for (Annotation declaredAnnotation : getDeclaredAnnotations()) {
2575 for (Annotation declaredAnnotation : sup.getDeclaredAnnotations()) {
2576 Class<? extends Annotation> clazz = declaredAnnotation.annotationType();
2583 /* Convert annotation values from HashMap to array. */
2584 Collection<Annotation> coll = map.values();
2585 return coll.toArray(new Annotation[coll.size()]);
2594 public native <A extends Annotation> A getDeclaredAnnotation(Class<A> annotationClass);
2601 public native Annotation[] getDeclaredAnnotations();
2604 * Returns true if the annotation exists.
2607 private native boolean isDeclaredAnnotationPresent(Class<? extends Annotation> annotationClass);
2610 String[] annotation = getSignatureAnnotation();
2611 if (annotation == null) {
2615 for (String s : annotation) {