commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Wannheden" <>
Subject Re: [HiveMind] extend BuildFactory to use static fields/methods
Date Thu, 02 Oct 2003 15:42:10 GMT
> 1) Could we just merge ConstructorFactory into BuilderFactory, to provide
both sets of options
> (using constructors, then optionally setting properties).

Certainly. I made some sacrifices to make this eventual step as painless as

> 2) Could we use
> to access the constructor (this applies to elsewhere in the framework).
Method  public static
> Object invokeConstructor(Class klass, Object[] args) seems to do the
trick, and I will be changing
> other code to start using this.

I figured that there must be some library doing exactly this, but I didn't
know it was available in commons-beanutils. Thanks for the pointer!

> 3) The exception thrown on line 133 should be more descriptive, come from, and
> include the correct Location.

Yes, I was hoping you would comment on this. I'm just learning how things
are done in HiveMind, so I just figured I'd do the simplest thing.

> 4) Need an update to framework/xdoc/BuilderFactory.xml to describe new
features (once merged into
> BuilderFactory).
> 5) For the constructor arguments, would this look better:
>   <construct ...>
>     <string>foo</string>
>     <service>service-id</service>
>     <configuration>config-id</configuration>
> ??  Maybe, maybe not.

Looks nice! I was just reusing the SetPropertyValue class here...

> 6) What if the constructor expects the Log, Messages or service id to be a
parameter?  Need <log/>
> <messages/> <service-id/> elements.

Didn't think about that. I assume you would still keep the attributes so
these can still be set as properties.

The code has many quirks as it is now, but it works. Especially the test
cases are coded in a very funky way. I just couldn't figure out how to best
do that. Maybe you have a good idea here.

If you think it would be helpful I could certainly do some of these changes.
Just let me know.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message