Hello
In the The AspectJ
TM Programming Guide we have see that is possible to do a pointcut with array type patterns like this
Object+[].The AspectJ
TM Programming Guide
- Pointcuts
-Appendix B. Language Semantics
Array type patterns
A type name pattern or subtype pattern can be followed by one or more
sets of square brackets to make array type patterns. So
Object[] is an array type pattern, and so is
com.xerox..*[][], and so is
Object+[].
We have tried a simple test but don't work
Can you help me?
public aspect Test {
private pointcut none();
private pointcut all() : !none();
protected pointcut scope() : all();
private pointcut exclusions() :
within(Test+);
private pointcut setObjectArray() : set(Object+[] *); // Error is here
declare error : scope() && exclusions() && setObjectArray() : "This is an array of Object or subclass" ;
}
Eclipse SDK
Version: 3.3.2
Build id: M20080221-1800
AJDT Version: 1.5.3.200807141310
AspectJ version: 1.6.1.20080703120000
Regards
--
...:::p3r$ºN_™