Ho Thomas, I had a couple of thoughts on a similar subject (adding more fluency to Castor at a general level), but can I please ask you to defer this discussion to until GSoC has finished completely (which is not more than a few days off).
I am not really in favour of simply changing all generated setters to return this instead of void, as this would break many existing contracts. But why not add additional methods that are designed with fluency in mind. Kind Regards Werner On 17.08.2011 10:20, Papendieck, Thomas wrote: > Hello, > > how about having setters returnig 'this'? > > In my unittests I have to create a lot of dummy structures. Currently I > create them in the 'setUp()' method eaven when the structure is shared by all > the tests. > > If setters would return 'this' I could initialize Constants like this: > > RootNode rn = new RootNode() > .setContainer1( > new Container1().setContainee(new Containee())) > .setContainer2(new Container1()).... > > I'd love not to have to create a bunch "one time references" to create a > Structure of castor objects. > > bye > Thomas > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

