[JSR308] Custom annotations?

Michael Ernst mernst at mpi-sws.mpg.de
Mon Feb 11 13:54:56 EST 2008


> Compliant Java compilers cannot change their behavior based 
> on different annotation values.

More specifically, when javac is run without an annotation processor
(that is, without a type-checking plug-in), then the presence/absence of
annotations cannot change what errors/warnings javac emits.

If you use an annotation processor with javac, via "javac -processor ...",
then the processor is permitted to issue additional errors/warnings.

I suspect that when Richard said, "[this code] cannot compile", he was
thinking of the situation where a type-checking annotation processor is
being used.

                    -Mike



More information about the JSR308 mailing list