Re: A Java 8 factory pattern

2016-10-22 Thread Niclas Hedhman
I am knee-deep in replacing "String identity" with "Identity identity", but will probably do some work on this tomorrow to see if it "feels" good or not. Another immediate candidate is then UnitOfWork itself... which is less needy since we already have UnitOfWorkPropagation taking care of it most

Re: A Java 8 factory pattern

2016-10-22 Thread Paul Merlin
Ahh lambdas :-) Niclas Hedhman a écrit : > Gang, > while working on something else, an interesting pattern was "discovered", > which I think minimizes the Factoty/Builder stuff quite a bit; > > public interface Amount > { > Property value(); > Property currency(); > } > > > @Structure > Va

A Java 8 factory pattern

2016-10-21 Thread Niclas Hedhman
Gang, while working on something else, an interesting pattern was "discovered", which I think minimizes the Factoty/Builder stuff quite a bit; public interface Amount { Property value(); Property currency(); } @Structure ValueBuilderFactory vbf; Amount a = vbf.create( Amount.class, pro