From 5233d336169eea7471624fa7d7a2c4b705a7167c Mon Sep 17 00:00:00 2001 From: acolyer Date: Wed, 17 Nov 2004 10:55:53 +0000 Subject: use AccessibleObject rather than java.lang.reflect.Member --- docs/adk15ProgGuideDB/annotations.xml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'docs/adk15ProgGuideDB') diff --git a/docs/adk15ProgGuideDB/annotations.xml b/docs/adk15ProgGuideDB/annotations.xml index 285746a64..456094cdc 100644 --- a/docs/adk15ProgGuideDB/annotations.xml +++ b/docs/adk15ProgGuideDB/annotations.xml @@ -902,7 +902,7 @@ through the getSignature method of the JoinPoint and JoinPoint.StaticPart interfaces. The MemberSignature interface is extended with the additional operation - java.lang.reflect.Member getMember(). The following fragment + java.lang.reflect.AccessibleObject getAccessibleObject(). The following fragment illustrates an example use of this interface to access annotation information. @@ -912,12 +912,7 @@ if (sig instanceof MemberSignature) { // this must be an initialization, pre-initialization, call, execution, get, or // set join point. - Member member = ((MemberSignature)sig).getMember(); - // unfortunately, Member does not extend AnnotatedElement, so a further cast is - // needed: - if (member instanceof Field) { // a set or get join point... - AnnotatedElement fieldAnnotationInfo = ((Field)member); - } + AnnotatedElement memberAnnotationInfo = ((MemberSignature)sig).getAccessibleObject(); } ]]> -- cgit v1.2.3