From: aclement Date: Fri, 25 Jan 2008 21:12:57 +0000 (+0000) Subject: paramannos: doc updates to give examples X-Git-Tag: V1_6_0M2~68 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c5c440e2d0786ccef63d859a7bb45e2e3a53cf63;p=aspectj.git paramannos: doc updates to give examples --- diff --git a/docs/adk15ProgGuideDB/annotations.xml b/docs/adk15ProgGuideDB/annotations.xml index 073312706..588b40b20 100644 --- a/docs/adk15ProgGuideDB/annotations.xml +++ b/docs/adk15ProgGuideDB/annotations.xml @@ -987,14 +987,69 @@ + Package and Parameter Annotations - Matching on package and parameter annotations is not supported - in AspectJ 1.5.0. Support for this capability may be considered in a future - release. - + Matching on package annotations is not supported in AspectJ. Support for + this capability may be considered in a future release. + + + + + Parameter annotation matching is being added in AspectJ1.6. + Initially only matching is supported but binding will be + implemented at some point. Whether the annotation specified in a pointcut should be + considered to be an annotation on the parameter type or an annotation on the parameter + itself is determined through the use of parentheses around the parameter type. + + Consider the following: + + + + + + + The method foo has a parameter of an annotated type, and can be matched by this pointcut: + + + + When there is a single annotation specified like this, it is considered to be part of the type + pattern in the match against the parameter: 'a parameter of any type that has the annotation @SomeAnnotation'. + + + To match the parameter annotation case, the method goo, this is the pointcut: + + + + The use of parentheses around the wildcard is effectively indicating that the annotation should be considered + separately to the type pattern for the parameter type: 'a parameter of any type that has a parameter annotation of + @SomeAnnotation'. + + + To match when there is a parameter annotation and an annotation on the type as well: + + + + The parentheses are grouping @SomeOtherAnnotation with the * to form the type pattern for the parameter, then + the type @SomeAnnotation will be treated as a parameter annotation pattern. +