Hey,

Now that we have Values, and they're all Immutable and such goodness, I 
think it is important to make it easy to mutate them! Currently one has 
to locate a ValueBuilderFactory and do:
SomeValue someInstance = ...;
ValueBuilder<SomeValue> builder = 
vbf.newValueBuilder(SomeValue.class).withPrototype(someInstance);
builder.prototype().someProperty().set("New value");
someInstance = builder.newInstance();

I suggest that we add a method to ValueComposite so that one can do this 
directly:
SomeValue someInstance = ...;
ValueBuilder<SomeValue> builder = someInstance.buildWith();
builder.prototype().other().set("New value");
someInstance = builder.newInstance();
---
Short and to the point, and the only thing you need as a client is the 
value instance you want to change.

WDYT?

/Rickard

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

Reply via email to