avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leo Sutic <leosu...@apache.org>
Subject Indexed Attributes
Date Thu, 14 Aug 2003 20:37:57 GMT

I thought some more on the need to get all classes that have a certain
attribute. I figured I'd not just allow the developer to make attributes
Inheritable, but also Indexable. Thus, you could make the AvalonService
attribute Indexable, and then run my nifty Index-Builder tool on the
classes you have written (MyService and MyService2) and get something like

    Attribute: AvalonService
    Class: MyService
    Class: MyService2

and so on... Then a standard API would use ClassLoader.getResources to
load up all those index files and *bam* there you go. The problem is this:

    You can't build such an index because Inheritable attributes mess it

If the class you are about to index is a subclass of some other class that
isn't part of the package of classes you are indexing, then the superclass
may change its set of attributes independently of the subclass, and your
index becomes out of date.

Solution is to ignore inherited attributes, but are we fine with that?


To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org

View raw message