[JSR308] Use of @Target meta-annotation
gafter at google.com
Sat May 19 11:34:51 EDT 2007
On May 19, 2007 8:26 AM, Michael Ernst <mernst at csail.mit.edu> wrote:
> > 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
> 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
> affect the behavior of annotation processors or other tools that look up
> the annotations.
The principle is that annotations should not affect the meaning of program
elements. The meaning of an annotation appearing in a program includes the
entity to which the annotation applies. I know you consider this point moot
and minor, but I do not.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the JSR308