Michael Hunger wrote:
> What about multiple prototype() calls on the same builder?
> Are they returning the same prototype object ?

Yes.

> What after builder.instance() ? Is the prototype still valid (should it be?) 
> and can be used
> to create slightly different instances?

The prototype and builder are still valid, and can still be used to 
create new instances. On builder.newInstance() the prototype state is 
copied to a new value object (one reason this needs to happen is because 
the prototype is mutable and the value isn't).

> Is / should there be a reset / cancel operation on the builder to reset 
> values?
> This takes us a bit to STM (Software transactional memory) ??

Reset can be done by calling .withPrototype() again on the builder. This 
resets the internal state and also invalidates the .prototype() 
previously retrieved. Calling .prototype() again will create a new 
prototype from the new state.

/Rickard

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

Reply via email to