Re: [picocontainer-dev] Decorator with 2.x ?

Paul Hammant <[email protected]> Thu, 27 Jan 2011 14:00:47 -0600
Newsgroups gmane.comp.java.picocontainer.devel
Message-ID <[email protected]>
--20cf301e2f4dcf9515049ad96767
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

One has to subclass Decorating and implement a Decorator I think.

You could easily bake conditional logic into your Decorating subclass that
would do what you want - right ?

See that I did some work on the site - http://picocontainer.github.com/ ?
Its almost ready to flip the switch.  This weekend perhaps I'll merge from
2.x to 3.x where needed and address the outstanding questions.

- Paul

2011/1/27 Gr=E9gory Joseph <[email protected]>

> Hi list,
>
> Is there any way to use Decorated with 2.x without using Decorating ?
> Point is, I want to use a certain adapter and a certain Decorator on
> only a limited set of components I'm registering, and it seems like
> creating my container with the Decorating factory will have all my
> components decorated.
>
> If org.picocontainer.behaviors.Decorated.Decorator was public, I guess
> I could do what I want here, but maybe I'm look at it the wrong way,
> and there's another method I could use ?
>
> I'm essentially trying to decorate components, bean-style, based on an
> existing mechanism (which loads those values of a JCR repository, if
> you must know) - so while I know where those values come from at
> registration time, I have no idea what they (add to that the fact that
> I need to proxy those objects because said values can change over
> time;))
>
> Thanks for any hint,
>
> -g
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

--20cf301e2f4dcf9515049ad96767
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

One has to subclass Decorating and implement a Decorator I think.<div><br><=
/div><div>You could easily bake conditional logic into your=A0<meta charset=
=3D"utf-8">Decorating subclass that would do what you want - right ?</div><=
div>
<br></div><div>See that I did some work on the site -=A0<a href=3D"http://p=
icocontainer.github.com/">http://picocontainer.github.com/</a> ?</div><div>=
Its almost ready to flip the switch. =A0This weekend perhaps I&#39;ll merge=
 from 2.x to 3.x where needed and address the outstanding questions.</div>
<div><br></div><div>- Paul<br><br><div class=3D"gmail_quote">2011/1/27 Gr=
=E9gory Joseph <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]">=
[email protected]</a>&gt;</span><br><blockquote class=3D"gmail_quote" styl=
e=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi list,<br>
<br>
Is there any way to use Decorated with 2.x without using Decorating ?<br>
Point is, I want to use a certain adapter and a certain Decorator on<br>
only a limited set of components I&#39;m registering, and it seems like<br>
creating my container with the Decorating factory will have all my<br>
components decorated.<br>
<br>
If org.picocontainer.behaviors.Decorated.Decorator was public, I guess<br>
I could do what I want here, but maybe I&#39;m look at it the wrong way,<br=
>
and there&#39;s another method I could use ?<br>
<br>
I&#39;m essentially trying to decorate components, bean-style, based on an<=
br>
existing mechanism (which loads those values of a JCR repository, if<br>
you must know) - so while I know where those values come from at<br>
registration time, I have no idea what they (add to that the fact that<br>
I need to proxy those objects because said values can change over<br>
time;))<br>
<br>
Thanks for any hint,<br>
<br>
-g<br>
<br>
---------------------------------------------------------------------<br>
To unsubscribe from this list, please visit:<br>
<br>
 =A0 =A0<a href=3D"http://xircles.codehaus.org/manage_email" target=3D"_bla=
nk">http://xircles.codehaus.org/manage_email</a><br>
<br>
<br>
</blockquote></div><br></div>

--20cf301e2f4dcf9515049ad96767--