Re: [lang] Generic object factories

2009-12-27 Thread Matt Benson
-Original Message- From: Stephen Colebourne [mailto:scolebou...@btopenworld.com] Sent: Saturday, December 26, 2009 15:55 To: Commons Developers List Subject: Re: [lang] Generic object factories Once upon a time, there was a commons sandbox project that held all sorts of small interfaces

Re: [lang] Generic object factories

2009-12-27 Thread James Carman
> for that? How is the interface useful without parameters? >> >> Gary >> >>> -Original Message- >>> From: Stephen Colebourne [mailto:scolebou...@btopenworld.com] >>> Sent: Saturday, December 26, 2009 15:55 >>> To: Commons Developers

Re: [lang] Generic object factories

2009-12-27 Thread Oliver Heger
ow is the interface useful without parameters? Gary -Original Message- From: Stephen Colebourne [mailto:scolebou...@btopenworld.com] Sent: Saturday, December 26, 2009 15:55 To: Commons Developers List Subject: Re: [lang] Generic object factories Once upon a time, there was a commons sa

RE: [lang] Generic object factories

2009-12-26 Thread Gary Gregory
To: Commons Developers List > Subject: Re: [lang] Generic object factories > > Once upon a time, there was a commons sandbox project that held all > sorts of small interfaces just like this one. It was called commons- > pattern. > > It didn't suceed, because these interfaces rea

Re: [lang] Generic object factories

2009-12-26 Thread Stephen Colebourne
Once upon a time, there was a commons sandbox project that held all sorts of small interfaces just like this one. It was called commons-pattern. It didn't suceed, because these interfaces really need to be provided by the JDK and implemented by all the JDK classes to be successful. Beyond that

Re: [lang] Generic object factories

2009-12-26 Thread Benson Margulies
Please pick another name, whatever else you do. JAXB uses ObjectFactory. - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org

RE: [lang] Generic object factories

2009-12-26 Thread Gary Gregory
om: Oliver Heger [mailto:oliver.he...@oliver-heger.de] > Sent: Saturday, December 26, 2009 11:35 > To: Commons Developers List > Subject: [lang] Generic object factories > > With Java 1.5 it is possible to define a generic interface for creating > an object: > > public i

Re: [lang] Generic object factories

2009-12-26 Thread Valery Silaev
Let me draw an analogy with Adoby Flex: There is an IFactory interface that servers for the same purpose and is quite useful. The problem it solves is the following: Typically (in Flex) object initialization is not only constructor invocation, but also setting certain properties and invoking diff

Re: [lang] Generic object factories

2009-12-26 Thread Ted Dunning
This interface seems so generic as to be difficult to understand what the motivation is. I can see the point of a one method interface like Comparable, but how does ObjectFactory help? Is your goal documentation? Name standardization? Reflection marker? On Sat, Dec 26, 2009 at 11:34 AM, Oliver

[lang] Generic object factories

2009-12-26 Thread Oliver Heger
With Java 1.5 it is possible to define a generic interface for creating an object: public interface ObjectFactory { T create(); } This is a proposal to add such an interface to [lang] 3.0 with a couple of default implementations, e.g. - a ConstantObjectFactory returning always the same co