JDK-5066419 : (soa) Should apt reuse instantiated factories?
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: javax.annotation.processing
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2004-06-22
  • Updated: 2005-10-21
  • Resolved: 2005-10-21
Related Reports
Relates :  
Description
As part of the effort to add a listener mechanism to apt (5048539), the discovery policy was modified to only load the class for an AnnotationProcessorFactory once.  On each round, the factory is asked to provide a new instance of the class and that instance is used by the tool to get information about the factory.  Another possible implementation would be to re-use the instantiated factory object across apt rounds; doing so would allow cross-round state to be stored in either local variables in the factory object or as static state in the class.

Comments
EVALUATION The JSR 269 annotation processing control API requires that processor objects (which combine the functionality of apt factories and processors) be reused across rounds.
21-10-2005

EVALUATION Will seek EE feedback on this issue. ###@###.### 2004-06-21 It would be preferable to reuse the factory objects across rounds; will consider for son of apt. ###@###.### 10/21/04 01:39 GMT
21-06-2004