Community
Participate
Working Groups
The evaluation of pointcuts refering to annotations can be done statically. However the AspectJ compiler is not capable of doing so. Compiling @TypeLevel(2) public aspect Alpha { void around(): (adviceexecution() && @within(TypeLevel) && if(TypeLevel.value() < 2)) || execution (* *(..)) { System.out.println("Test"); } } will result in an error. However it would be desirable if the AspectJ Compiler would evaluate these pointcuts at compiletime.
some context for this bug .. I think it has been raised based on a discussion I had at AOSD. Annotations are entirely static so it *could* be possible to do something - however I'd not thought the testcase here was the use case, I'd assumed the use case was something more like declare warning.