[JSR308] Use of @Target meta-annotation

Michael Ernst mernst at csail.mit.edu
Sat May 19 11:26:02 EDT 2007


Neal-

> The target of an annotation is part of its meaning.

I think you are splitting hairs.  The meaning of an annotation is
determined by its specification, typically written in its Javadoc, and also
including its @Target meta-annotation.  The target of a particular
annotation instance only determines where the annotation instance appears,
not the semantics.

In any event, this minor point is moot with respect to the discussion at
hand, which was regarding violation of the principle that annotations
should not affect Java behavior.  The principle is not violated:  the
meaning of the program with respect to a Java compiler and VM are not
affected by annotations.  There is no principle that annotations should not
affect the behavior of annotation processors or other tools that look up
the annotations.

                    -Mike



More information about the JSR308 mailing list