Webrev for making parts of TypeAnnotationPosition immutable
eric.mccorkle at oracle.com
Fri Jan 31 09:44:11 PST 2014
The following webrev implements a number of changes to
TypeAnnotationPosition. It makes most of the core data immutable, and
changes the way that TypeAnnotationPositions are created.
As opposed to the zero-argument constructor with mutable fields,
TypeAnnotationPositions are now created using static methods.
This patch also marks some field and methods as deprecated (in
comments), as I plan to remove them in forthcoming patches.
One possibility that came up in review was making TypeAnnotationPosition
an abstract superclass, and having subclasses for each of the different
I also could not make some of the fields final (type_index,
exception_index, offset), as they are modified by Gen. This is most
visible in the updated ClassReader. I will be investigating ways to
deal with this in forthcoming patches.
The webrev is here:
This patch has already been reviewed by the javac team; however, I would
like to give a chance for any tools (such as checkers), that currently
use type annotations to run tests before I integrate it. Please look
over the patch, and run any tests that should be run.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 303 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/type-annotations-dev/attachments/20140131/e5456211/eric_mccorkle.vcf
More information about the type-annotations-dev