dev@glassfish.java.net

Annotation processing

From: Chris Kasso <chris.kasso_at_oracle.com>
Date: Thu, 20 Oct 2011 14:53:21 -0700

I'd like to introduce a new annotation to eliminate the need to manually
add new log messages to the LogStrings.properties file. Instead, the
LogStrings.properties files would be generated at build time.

It appears that most of the annotations in GF are processed at runtime. Is
there any prior art in GF/nucleus for processing annotations at build
time (e.g. javac -processor ...)? The annotation I'm introducing will
have a RetentionPolicy of SOURCE.

This may just be a question of how to hook my annotation processor into the
build process - but if there are other annotation processors already hooked
into the build (or a framework in GF for constructing annotation processors)
I'd like to leverage the existing mechanism before cutting my own path.

Chris