Annotations update
"Dave Brosius" <[email protected]>
| Newsgroups | gmane.comp.jakarta.bcel.devel |
|---|---|
| Message-ID | <003101c50a88$72d13370$397496d1@MBFG> |
It would seem I have parsing of RuntimeVisibleAnnotations and
RuntimeInvisibleAnnotations working now.
I still need to add accessor methods for getting all the info out of them,
as well as the support for building new ones.
Two things I am puzzling over, is
1) How deep do the visitors go? Annotations are rather convoluted beasties.
Here's the containment hierarchy
Annotations
|
-----AnnotationEntry
|
-------ElementValuePair
|
------ElementValue
Currently the visitor visits, Annotation and AnnotationEntry, but we could
choose to go deeper, just not sure how bloated the visitor should be.
2) ElementValue is really a c-style union structure, based on a tag.
Currently I'm am just holding all the various union values in this one class
(5 different union sections), and in the accessor methods, I make sure that
you are allowed to access the section of the union that you are asking for
based on the tag. Obviously from a purity standpoint, this is foogly.
ElementValue certainly could be derived from for each union section, but
that makes the Annotation code even more heavy (see above). Any thoughts?
There will be 2 additional method ParameterAnnotations classes, as well as a
AnnotationDefault attribute, so this section is pretty beafy, as is.
--thanks, dave