RE: [picocontainer-dev] Gems Behaviors and further on down....
"Michael Rimov" <[email protected]> Mon, 23 Jun 2008 10:51:04 -0700
| Newsgroups | gmane.comp.java.picocontainer.devel |
|---|---|
| Organization | Centerline Computers, Inc |
| Message-ID | <00bd01c8d559$b8af21f0$2a0d65d0$@com> |
> There is a PicoBuilder in Gems too.
>
> All characteristics can be turned on for any derivative PicoContainer.
> It's likely you can't name them as Characteristics.FOOBAR, but there's
> no reason that MyCharacteristic.FOOBAR won't work too.
>
> AdaptingBehavior recognizes all the built-in characteristics, a sub-
> class of that could recognize one or two more...
>
> Maybe the the JMX one could do with a test case.
I was digging, and it appears that about 80% of the adapter factories (in
particular the behaviors) have a default constructor. So since we have a series
of properties out there, why don't we just dump a classname into the properties
as well?
So the properties such Caching would have:
[
{cache, true}
{cache_classname, org.picocontainer.behaviors.Caching}
]
So it would allow dynamic loading of most of the adapter factories as needed.
Ultimately, it would allow dynamic incorporation of many behaviors from Gems,
NanoWar, anything else we want, and if the behavior doesn't have a default
constructor, (We currently don't have dynamic inclusion of Assimilating as it
is) that's fine, you need to instantiate it another way, and go through the
"rigamarole" of subclassing Characteristics, and a new AdaptingBehavior.
Would this work at all in theory? I've got this morning/early afternoon to work
on a patch if you're interested.
-Mike
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email