O - The Object being built by BB - The Builder that is building O and is configured by
AbstractConfigurerpublic abstract class AbstractConfigurer<O,B extends Builder<O>> extends Object implements Configurer<O,B>
Configurer that allows subclasses to only implement
the methods they are interested in. It also provides a mechanism for using the
Configurer and when done gaining access to the Builder
that is being configured.| 构造器和说明 |
|---|
AbstractConfigurer() |
public void init(B builder) throws Exception
ConfigurerBuilder. Here only shared state should be created
and modified, but not properties on the Builder used for building
the object. This ensures that the Configurer.configure(Builder) method uses
the correct shared objects when building. Configurers should be applied here.public void configure(B builder) throws Exception
Configurerpublic B and()
Builder when done using the Configurer.
This is useful for method chaining.Builder for further customizationsprotected final B getBuilder()
Builder. Cannot be null.BuilderIllegalStateException - if Builder is nullpublic void setBuilder(B builder)
Builder to be used. This is automatically set when using
AbstractConfiguredBuilder.apply(AbstractConfigurer)builder - the Builder to setCopyright © 2021. All rights reserved.