[JSR308] Reading annotations from separate annotation files

Michael Ernst mernst at csail.mit.edu
Thu Oct 25 06:21:34 EDT 2007

Several people have recently requested that the JSR 308 prototype
implementation should be able to read an annotation file or spec file
directly, without requiring class file modifications.  The compiler can
already do this in a sense, which is explained in the checkers framework
in section 7:

In particular, you can:
 1. express the desired annotations in the form of a skeleton file, which is
    Java source code with trivial bodies that always throw an exception, and
 2. supply those skeleton classes to the Java compiler when compiling (but
    not when running) your program.

Skeleton classes are more readable than our other formats for expressing
the annotations.  Here is a question for the people who want to ability to
read annotation files or spec files:  Does this capability satisfy you in
the short term?  in the long term?  Please let me know.


More information about the JSR308 mailing list