Bug 133340 - [annotations] Evaluation of Annotations in if-pointcut
Summary: [annotations] Evaluation of Annotations in if-pointcut
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-27 06:42 EST by Florian Forster CLA
Modified: 2007-10-24 09:36 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Forster CLA 2006-03-27 06:42:14 EST
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.
Comment 1 Andrew Clement CLA 2006-03-27 07:52:15 EST
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.