I've heard Leo's work with Attributes mentioned a lot in this group. For those of us coming in late in the game, do you have an example/illustration?
Thanks! Jonathan Hawkes
The basic principle doesn't change. You still have to declare them via a javadoc comment, but the syntax is a bit different. Essentially you are coding a constructor. For example, instead of the current way to declare a component:
@avalon.component version=1.1
It would be written in this manner:
@AvalonComponent(1.1)
Another essential difference is that the attributes are encoded into the class itself instead of as a separate XML, serialized object, or other format file. This protects the system from broken classloaders that don't allow you to pull resources from a JAR file (only classes). It also protects you from format changes to the said XML, serialized object, etc. files.
I believe the work is over at Jakarta Commons, but I need to double check.
We can ensure that Avalon components have a consistent format for the necessary attributes by including them in the framework package and requiring their use.
It is a very simple, yet powerful concept. If you want to pull an attribute from a method, no problem. Look up the method and ask for its attributes. You use normal reflection calls to get at the members you need, and the utilities will return you a set of real objects with a real queriable interface. The same spirit behind the current meta model without the biggest limitations.
--
"They that give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety."
- Benjamin Franklin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
