Hi,

I'm currently removing all uses of ObjectBuilders, and have a question for you guys.

Currently you can access a bunch of different factories from a Module. Example:
module.valueBuilderFactory().newValue(SomeValue.class);

But all of those factories are only really "aspects" of that Module. In reality, we could actually change to this:
interface Module
  extends ValueBuilderFactory, ServiceFinder, ....
{}

i.e. those methods are directly available from the Module itself, but still segmented into "mixin types". ModuleInstance implements them all though, but this is in runtime, and since only ModuleInstance would implement them it is ok to not have mixins (or similar) for reuse.

Example usage:
module.newValue(SomeValue.class);
module.findService(SomeService.class);
module.newQueryBuilder(SomeEntity.class);

For now we could keep the access methods, but deprecated. It would also be possible to allow injection of the individual interfaces, i.e @Structure ValueBuilderFactory vbf, but it would get the ModuleInstance as implementation.

WDYT?

/Rickard

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to