Package cn.sliew.milky.dsl
Interface Configurer<O,B extends Builder<O>>
-
- Type Parameters:
O- The object being built by theBuilderBB- TheBuilderthat builds objects of type O. This is also theBuilderthat is being configured.
- All Known Implementing Classes:
AbstractConfigurer
public interface Configurer<O,B extends Builder<O>>Allows for configuring aBuilder. AllConfigurerfirst have theirinit(Builder)method invoked. After allinit(Builder)methods have been invoked, eachconfigure(Builder)method is invoked.- See Also:
AbstractConfiguredBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidconfigure(B builder)voidinit(B builder)Initialize theBuilder.
-
-
-
Method Detail
-
init
void init(B builder) throws Exception
Initialize theBuilder. Here only shared state should be created and modified, but not properties on theBuilderused for building the object. This ensures that theconfigure(Builder)method uses the correct shared objects when building. Configurers should be applied here.- Parameters:
builder-- Throws:
Exception
-
-