[JSR308] local variables and annotation processing

Chester Chen CChen at ascentmedia.com
Wed Dec 17 16:47:17 EST 2008

Just to give some ideas what other use cases I am using annotation processing for
when you considering the new interface.

1. I used @ClientPackage and @ServerPackage annotation on .java files to indicate 
which file should be packaged into client API jar files and generate client API javadocs. 

2. I used @RolesAllowed and @DependedRoles on SessionBeans (together with Velocity Template)
to generate EJB .xml descriptive files for security role and principal mapping. It also geneate
SQL scripts for security role update. This allows developer to add any additional Role by simply
add an annotion on the source code and ant task take cares the rest. 

3. Using Annoation procesing to generate Weblogic specific EJB descriptive xml files (as with new EJB3
   weblogic doens't have the equivallent tools for these tasks)

and anthor team used Metros apt generate WebServices WSDL etc. 

Hope this helps. 


-----Original Message-----
From: Mahmood Ali [mailto:mahmood at MIT.EDU]
Sent: Wednesday, December 17, 2008 12:57 PM
To: JSR 308 (Annotations) mailing list
Cc: Chester Chen
Subject: local variables and annotation processing


I want to emphasize a couple of points regarding the most recent  
discussion abut the checker framework:

Annotation processors or checkers using checker framework get a  
cleaner interface than that of the javac: it is more consistent and  
better documented.  The framework hides a lot of the complexity (e.g.  
method members, local variables, etc).

However, the Checker Framework is optimized and designed for type- 
checking annotation processors.  Non-type-checking processors may  
still benefit from the framework (especially SourceChecker/ 
SourceVisitor).  However, a more lighter-weight interfaces might be  

If there is such a need for such light-weight interfaces (and  
especially if they are people who are interested in contributing to  
this effort), we can consider this possibility.


More information about the JSR308 mailing list