diff options
author | acolyer <acolyer> | 2005-08-04 11:26:36 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-08-04 11:26:36 +0000 |
commit | 951ca5082f6174c24772f06ca50de1b8f2c508c8 (patch) | |
tree | b1567e95c57d0ef3fb7e194a3e09737b52c294ee /docs | |
parent | 7bd52be2163917fd553699b884bc06d0788a816f (diff) | |
download | aspectj-951ca5082f6174c24772f06ca50de1b8f2c508c8.tar.gz aspectj-951ca5082f6174c24772f06ca50de1b8f2c508c8.zip |
fixed broken example wrt. annotation inheritance
Diffstat (limited to 'docs')
-rw-r--r-- | docs/adk15ProgGuideDB/annotations.xml | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/docs/adk15ProgGuideDB/annotations.xml b/docs/adk15ProgGuideDB/annotations.xml index 8d41e9a0e..4094a6e61 100644 --- a/docs/adk15ProgGuideDB/annotations.xml +++ b/docs/adk15ProgGuideDB/annotations.xml @@ -1165,23 +1165,27 @@ aspect X { - pointcut annotatedMethodCall() : - call(@SomeAnnotation * C1.aMethod()); + pointcut annotatedC2MethodCall() : + call(@SomeAnnotation * C2.aMethod()); - pointcut c1MethodCall() : - call(* C1.aMethod()); + pointcut annotatedMethodCall() : + call(@SomeAnnotation * aMethod()); } ]]></programlisting> <para> - The pointcut <literal>annotatedMethodCall</literal> will match the call - to <literal>c1.aMethod()</literal>, but not the call to - <literal>c2.aMethod()</literal>. + The pointcut <literal>annotatedC2MethodCall</literal> will not match anything + since the definition of <literal>aMethod</literal> in <literal>C2</literal> + does not have the annotation. </para> <para> The pointcut <literal>c1MethodCall</literal> matches both - <literal>c1.aMethod()</literal> and <literal>c2.aMethod()</literal>. + <literal>c1.aMethod()</literal> and <literal>c2.aMethod()</literal>. The call + to <literal>c2.aMethod</literal> is matched because the call join point has + multiple signatures (<literal>@SomeAnnotation C1.aMethod()</literal> and + <literal>C2.aMethod()</literal>), and the former of those signatures is + exactly matched by the pattern. </para> </sect2> |