Bug 458194

Summary: It would be nice if annotations declared in aspects generated from an annotation processor would in turn be available for annotation processing
Product: [Tools] AspectJ Reporter: Steinar Henriksen <steinar>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 1.8.4   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Steinar Henriksen CLA 2015-01-22 17:13:58 EST
It would be nice if annotations declared in aspects generated from an annotation processor (implementation of javax.annotation.processing.Processor) would in turn be available for annotation processing. For example, when generating Java source code from an annotation processor, if the generated source code contains an annotation, then that annotation will be made available for annotation processing.

The following is an example aspect that could have been generated from an annotation processor. The aspect-declared @SuperEntity annotation will not be available for annotation processing if it has been generated. You can get it at runtime if it has the right retention, but that's not the point.


import javax.persistence.Entity;
import foo.SuperEntity;

public aspect DoIt {
  declare @type : (@Entity *) : @SuperEntity;
}