Re: [bluprint + xbean-reflect] Use of factories

2009-04-23 Thread David Blevins
To add onto this thought process, a lot of these features are also needed by the Java Context and Dependency Injection (JCDI, JSR-299) specification. It has type base constructor args, reusable instance factories, and some other things like support for setters that have multiple arguments.

Re: [bluprint + xbean-reflect] Use of factories

2009-04-23 Thread David Blevins
Curious what Dain's input on this might be. A lot of this "deep object graph" work was driven by Plexus which of course also has post construct callbacks. -David On Apr 23, 2009, at 2:02 AM, Guillaume Nodet wrote: Another thing is related to initialization of beans and cyclic dependencie

Re: [bluprint + xbean-reflect] Use of factories

2009-04-23 Thread David Blevins
Give this a look and see what you think. What we have isn't too far off. http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-reflect/src/test/java/org/apache/xbean/recipe/ScratchPadTest.java?revision=768055&view=markup In regards to argument matching, we'll need to support pure type based

Re: [bluprint + xbean-reflect] Use of factories

2009-04-23 Thread Guillaume Nodet
Right, but it might we worth considering enhancing xbean-reflect to better support our needs. For example initialization and destruction methods are now wired in blueprint, but a better place would be xbean imho. Constructor injection is a bit of a magic in xbean right now, and there's no clear dif

Re: [bluprint + xbean-reflect] Use of factories

2009-04-23 Thread Guillaume Nodet
Right, but in addition to instanceFactory, we also need to provide the methodFactory. So if we have class ColorFactory { public void setFoo(String foo) { } public Color createColor(String type) { } } class RGBColor extends Color { public void setR(int r) {} public void setG(int g) {}

Fwd: [bluprint + xbean-reflect] Use of factories

2009-04-23 Thread Guillaume Nodet
-- Forwarded message -- From: Guillaume Nodet Date: Thu, Apr 23, 2009 at 10:46 Subject: [bluprint + xbean-reflect] Use of factories To: dev When trying to implement the dedens-on attribute for blueprint, I had to find my way in xbean-reflect about constructor recipes and nested