[JSR308] Checkers in the future on different JDKs

Michael Ernst mernst at csail.mit.edu
Sun Sep 28 14:32:30 EDT 2008


Adam-

> I've been looking a bit through the checkers framework code, and I  
> noticed that it uses extensively the com.sun.source.tree.* classes  
> (for manipulating the AST of a program).
> 
> As far as I know, the com.sun.* classes are Sun-JDK specific, and  
> aren't part of the public API.
> So if in the future JSR308 becomes part of Java7, the checkers  
> framework will only be guarenteed to work on Sun JDKs. Am I right?
> (This API may also change in a backwards-incompatible way, so the  
> checkers framework could also stop working on newer releases?)

You are correct:  A checker written using the Checker Framework currently
only works as a plug-in to Sun's javac.  The checker does now work with
other Java compilers that don't implement Sun's proprietary Tree API.  The
Tree API is publicly documented and is relatively stable.

In the future, the Checker Framework should be migrated to use the Java
Model AST of JSR 198 (Extension API for Integrated Development
Environments) instead of Sun's Tree API.  JSR 198 gives access to the
entire source code of a method in an implementation-neutral way.  Even
then, a checker would only work on those compilers/IDEs that implement the
JSR 198 standard.

                    -Mike



More information about the JSR308 mailing list