]> source.dussan.org Git - aspectj.git/commitdiff
remove dependency on 1.2 API - runtime libs must work at 1.1 level
authoracolyer <acolyer>
Thu, 10 Mar 2005 12:58:40 +0000 (12:58 +0000)
committeracolyer <acolyer>
Thu, 10 Mar 2005 12:58:40 +0000 (12:58 +0000)
docs/adk15ProgGuideDB/annotations.xml

index d7abfe0af11247f7938a421845cf73ffb28640d9..cad65a650bbbcde369b296bbc393a92db9c9a557 100644 (file)
     <para>
       Access to annotation information on members at a matched join point is also available
       through the <literal>getSignature</literal> method of the <literal>JoinPoint</literal>
-      and <literal>JoinPoint.StaticPart</literal> interfaces. The <literal>MemberSignature</literal>
-      interface is extended with the additional operation 
-      <literal>java.lang.reflect.AccessibleObject getAccessibleObject()</literal>. The following fragment
+      and <literal>JoinPoint.StaticPart</literal> interfaces. The <literal>Signature</literal>
+      interfaces are extended with additional operations that provide access to the  
+      <literal>java.lang.reflect</literal> <literal>Method, Field</literal> and 
+      <literal>Constructor</literal> objects on which annnotations can be queried. The following fragment
       illustrates an example use of this interface to access annotation information.
     </para>
 
        <programlisting><![CDATA[
        Signature sig = thisJoinPointStaticPart.getSignature();
        AnnotatedElement declaringTypeAnnotationInfo = sig.getDeclaringType();
-       if (sig instanceof MemberSignature) {
-         // this must be an initialization, pre-initialization, call, execution, get, or
-         // set join point.
-         AnnotatedElement memberAnnotationInfo = ((MemberSignature)sig).getAccessibleObject();
+       if (sig instanceof MethodSignature) {
+         // this must be a call or execution join point
+         Method method = ((MethodSignature)sig).getMethod();
        }
        ]]></programlisting>