Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 359106

Summary: hasmethod(@MyAnnotation * *(..)) does not work with declare @method * *(..)) : @MyAnnotation
Product: [Tools] AspectJ Reporter: Carlos Anjos <carlos.anjos>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: NEW --- QA Contact:
Severity: major    
Priority: P3 CC: aclement, carlos.anjos
Version: 1.6.12   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Carlos Anjos CLA 2011-09-27 12:37:16 EDT
After enabling the special compiler features, I declared something like:

declare parents : hasmethod(@MyAnnotation * *(..)) implements MyInterface

This works, if I explicitly annotate a method with @MyAnnotation.

However it does not work if previously I do something like:


declare @method: * MyClass.*(..) : @MyAnnotation;

I've tested, and the methods really get annotated, but these annotations are not visible to the hasmethod pointcut.
Comment 1 Andrew Clement CLA 2011-10-03 17:04:23 EDT
This is an issue, but I wanted to say one reason hasmethod is not a feature that is not on by default is because it doesn't work with some of the other language features, including ITDs and the case you have here.