equal
deleted
inserted
replaced
51 * Accessor method to allow code sharing |
51 * Accessor method to allow code sharing |
52 */ |
52 */ |
53 abstract byte[] getAnnotationBytes(); |
53 abstract byte[] getAnnotationBytes(); |
54 |
54 |
55 /** |
55 /** |
|
56 * Accessor method to allow code sharing |
|
57 */ |
|
58 abstract Executable getRoot(); |
|
59 |
|
60 /** |
56 * Does the Executable have generic information. |
61 * Does the Executable have generic information. |
57 */ |
62 */ |
58 abstract boolean hasGenericInformation(); |
63 abstract boolean hasGenericInformation(); |
59 |
64 |
60 abstract ConstructorRepository getGenericInfo(); |
65 abstract ConstructorRepository getGenericInfo(); |
538 |
543 |
539 private transient Map<Class<? extends Annotation>, Annotation> declaredAnnotations; |
544 private transient Map<Class<? extends Annotation>, Annotation> declaredAnnotations; |
540 |
545 |
541 private synchronized Map<Class<? extends Annotation>, Annotation> declaredAnnotations() { |
546 private synchronized Map<Class<? extends Annotation>, Annotation> declaredAnnotations() { |
542 if (declaredAnnotations == null) { |
547 if (declaredAnnotations == null) { |
543 declaredAnnotations = AnnotationParser.parseAnnotations( |
548 Executable root = getRoot(); |
544 getAnnotationBytes(), |
549 if (root != null) { |
545 sun.misc.SharedSecrets.getJavaLangAccess(). |
550 declaredAnnotations = root.declaredAnnotations(); |
546 getConstantPool(getDeclaringClass()), |
551 } else { |
547 getDeclaringClass()); |
552 declaredAnnotations = AnnotationParser.parseAnnotations( |
|
553 getAnnotationBytes(), |
|
554 sun.misc.SharedSecrets.getJavaLangAccess(). |
|
555 getConstantPool(getDeclaringClass()), |
|
556 getDeclaringClass()); |
|
557 } |
548 } |
558 } |
549 return declaredAnnotations; |
559 return declaredAnnotations; |
550 } |
560 } |
551 |
561 |
552 /** |
562 /** |