JSR 269 Passes Final Approval Ballot

The votes are in and JSR 269 has passed its final approval ballot!

Now that the initial JSR 269 API is defined, I'm looking forward to using the API for various meta-programming tasks, like writing coding convention checkers and incrementally refining the API in JDK 7.

Comments:

I want to process annotations on local classes and anonymous classes by using Pluggable Annotation Processing API. P.S. Is this a bug or a specification? http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6416679

Posted by Manabu Nakamura on November 07, 2006 at 07:42 PM PST #

Manabu,

The standardized version of the API does not support operating on local and anonymous classes; although those classes can be modeled using the standard API.

However, using the com.sun.source.tree API in JDK 6, those kinds of classes can be processed. For an example of how to use the tree API in this fashion, see some of the tests in the open source javac project's test/tools/javac/api directory, in particular TestOperators.java: https://openjdk.dev.java.net/source/browse/openjdk/compiler/trunk/test/tools/javac/api/TestOperators.java

Posted by Joe Darcy on November 13, 2006 at 05:56 AM PST #

Thank you, Joe. I want to write an annotation processor like this. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6329722 I have used the com.sun.source.tree API. However, I can't get the Element for the local and anonymous class by using Trees.instance(processingEnv).getElement(getCurrentPath()) in TreePathScanner#visitClass(). Is this a bug or a specification? P.S. I can't get a TypeElement object of a local and anonymous class by processingEnv.getElementUtils().getTypeElement("Processor.1LocalClass") and processingEnv.getElementUtils().getTypeElement("Processor.1") in 6rcb93 or later. Is this a valid behavior? http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6416679

Posted by Manabu Nakamura on November 14, 2006 at 03:19 PM PST #

Post a Comment:
Comments are closed for this entry.
About

darcy

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
News

No bookmarks in folder

Blogroll