On Sat, 11 Jan 2003 04:20, Jakob Praher wrote:
> Am Mit, 2003-01-08 um 06.23 schrieb Peter Donald:
> > Hi,
> >
> > On Wed, 8 Jan 2003 03:44, Leo Simons wrote:
> > > /** @attribute SomeClassNameAttribute("blaat") */
> >
> > I actually dislike that approach immensly ;) The way I have been doing it
> > is basically runtime access to javadocs with two different styles.
> >
> > * Tags with parameters. ie
> >
> > @avalon.service type="Foo" optional="true"
> >
> > * Tags with raw text. ie
> >
> > @description Here is a description of the gratest song in the world.
>
> how should this work within a generic implementing of attributes as
> serialized objects ?

It doesn't. Oririginally when I started experimenting with this stuff I used 
serialized objects but the problem was that to load the objects the .class 
file for the attribute had to be present and resolvable which could be a 
problem in some of the more complicated classloader setups. 

In the end I decided that implementing of attributes as generic serialized 
objects was not worth the hassle. I also find that data-based specs tend to 
be more resistent to change. 

We could still support serialized objects and just interpret a string 
attribute that had something like 

org.apache.avalon.MyAttribute( x="value" )

But I am not sure what we would really gain. I would much rather use 
data-based attributes and have a schema to validate them against.

> > This is the same approach xdoclet uses and it seems to work well!
>
> I have used xdoclet only in the context of castor once - so I don't know
> enough about it.
> But I was reading they are doing a complete rewrite for version 2.0 ...

Yep. They have been going to do the rewrite for a year or more ;) It looks 
like they will use qdox which rocks. It also looks like they will be using a 
model like I described above. 

They had plans for a XRAI (Runtime attribute retrieval) but I don't know if 
they ever got started. I also don't know if they have any plans for schema 
language.

-- 
Cheers,

Peter Donald
*----------------------------------------------------*
|    "the mother of idiots is always pregnant."      |
*----------------------------------------------------*



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to