- All Superinterfaces:
Prototype.Api
- All Known Implementing Classes:
OptionBuilder.BuilderBase.OptionBuilderImpl
If an option itself has a builder, we add a method with
Consumer<Builder>.
The type must have a builder method that returns a builder type.
The builder then must have a build method that returns the option type, or a buildPrototype method.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forOptionBuilder.static classOptionBuilder.BuilderBase<BUILDER extends OptionBuilder.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends OptionBuilder> Fluent API builder base forOptionBuilder. -
Method Summary
Modifier and TypeMethodDescriptionstatic OptionBuilder.Builderbuilder()Create a new fluent API builder to customize configuration.static OptionBuilder.Builderbuilder(OptionBuilder instance) Create a new fluent API builder from an existing instance.Name of the static builder method, or<init>to identify a constructor should be used.Type of the class declaring abuilderMethodName()used to get an instance of the builder to send to the generated setter with consumer.Type of the builder.Name of the build method (buildorbuildPrototype).
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
builderMethodName
String builderMethodName()Name of the static builder method, or<init>to identify a constructor should be used. If a method name is defined, it is expected to be on the type of the option. If constructor is defined, it is expected to be an accessible constructor on thebuilderType().- Returns:
- name of the method
-
builderType
TypeName builderType()Type of the builder.- Returns:
- type of the builder
-
builderMethodType
TypeName builderMethodType()Type of the class declaring abuilderMethodName()used to get an instance of the builder to send to the generated setter with consumer.- Returns:
- type declaring the builder method
-
buildMethodName
String buildMethodName()Name of the build method (buildorbuildPrototype).- Returns:
- builder build method name
-