-----Original Message-----
From: Berin Loritsch [mailto:[EMAIL PROTECTED]
Sent: den 1 augusti 2003 17:12
To: Avalon Developers List
Subject: Re: [RT] New beginning & meta
Leo Sutic wrote:
> Berin Loritsch wrote:
>
>>3) Scrap the whole thing and use a more generic library. Implication:
>
> the
>
>> Avalon meta package goes in the crapper, and we use something like
>
> Commons
>
>> Attributes (some work has to be done with that as they don't
>
> support the
>
>> name="value" notation for tags).
>
>
>
> Consider .Net: When you add attributes to something, *all* attributes
> get compiled in. It is then deferred to runtime which attributes are
> to be recognized.
>
> I think this would solve a lot. First, we could use *one* metainfo
> builder for all containers. That builder would be forward-compatible
> and container-agnostic.
> You could experiment as much as you wanted with new container
features.
Essentially you prefer option 3: scrap Avalon Meta as it is now defined
in sandbox, and use something more generic. In the absence of JSR 175,
we need to look at something that will work in the mean time--perhaps a
BCEL bound tool.
> -oOo-
>
> With the risk that this turns into a "Leo's Picks" column I am also
> beginning to like the way attributes are handled in .Net, with value
> objects. You'd
> have:
>
> import org.apache.avalon.framework.attributes.ThreadSafe;
> import org.apache.avalon.framework.attributes.Dependency;
>
> /**
> *
> * @attribute new ThreadSafe()
> * @attribute new Dependency( MyDependency.class, "my-dep" )
> */
> public class MyComponent {
> }
The .NET equivalent would be:
[ThreadSafe]
[Dependency( MyDependency.class, "name", Optional.True )]
So we would drop the "new" in the example above.
I *think* that's only because C#, like C++ allows you to create objects
on the stack. What I wanted was to allow some recursive expressions
without making them inconsistent with the Java language:
BAD: @attribute Dependency ( new Color ("red") )
BETTER: @attribute new Dependency ( new Color ("red") )
/LS
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]