Re: Annotation Attributes

Simon Kitching <[email protected]>
Newsgroups gmane.comp.jakarta.bcel.devel
Message-ID <1107400014.5418.74.camel@blackbox>
On Wed, 2005-02-02 at 21:45 -0500, Dave Brosius wrote:
> I am starting to look at putting Annotation attribute support into BCEL. 
> There are two types of Annotation attributes, with
> two different string constants.
> 
> RuntimeVisibleAnnotations - those found in class files, and loaded by the 
> JVM
> RuntimeInvisibleAnnotations - those found in class files, but not loaded by 
> the JVM.
> 
> I am thinking that I will just create one Annotation attribute class in 
> BCEL, and allow for querying wheither this attribute is runtime visible or 
> not.
> 
> Does anyone see a problem with this?

Hmm .. pragmatism vs clean design. 

The clean design would have a parent Annotation class, then subclasses
for Visible and Invisible, yes? But this would increase the BCEL library
by the size of two additional classes.

Are there operations that are valid on Visible annotations that are not
valid on invisible ones? If so, that would suggest using multiple
classes. If not, then I guess I'll stay firmly on the fence :-)


Cheers,

Simon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.