I\'m trying to have an abstract base class for some builder classes so I can easily reuse code between the Builder implementations. I want my builders to support method chaining
This should help:
abstract class AbstractBuilder> { public AbstractBuilder foo() { // set some property return (AbstractBuilder) this; } abstract AbstractBuilder bar(); abstract Object build(); }