[JSR308] Re: Classfile representation of annotations

Neal Gafter gafter at google.com
Sat Feb 3 16:59:51 EST 2007

Both compile-time verification (of annotations) and annotations as part of
the interface don't require annotations be preserved in the bytecode.  By
bytecode here I don't mean class files, but the part of the class file
representing the body of a method.  In other words, section 4 cites use
cases that support changes to the class file format, but don't support
anything in the class file format to represent anything in the interior of

On 2/3/07, Michael Ernst <mernst at csail.mit.edu> wrote:
> Neal-
> > What API changes do
> > we want that would require class file format changes?
> I'm not sure there are API changes, but there are tasks that require a
> classfile representation of the annotations.
> Section 4 of the proposal starts out as follows:
>   4  Class File Format Extensions
>   Java annotations (including the extended annotations) must be stored in
>   the class file for two reasons. First, they may be part of the interface
>   of a class and, if so, must be available to the compiler (really, to the
>   type-checking plug-in [Dar06]) when compiling clients of the
>   class. Second, since class files may originate from any source, the
>   information may be useful in other contexts, such as compile-time
>   verification.
> Several examples have been posted to this list, as well.
>                     -Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.csail.mit.edu/pipermail/jsr308/attachments/20070203/634b12d6/attachment.html

More information about the JSR308 mailing list