Interface PlaceholderComponent.Builder
-
- All Superinterfaces:
AbstractBuilder<PlaceholderComponent>,Buildable.Builder<PlaceholderComponent>,Builder<PlaceholderComponent,PlaceholderComponent.Builder>,ResettableBuilder<PlaceholderComponent,PlaceholderComponent.Builder>
- Enclosing interface:
- PlaceholderComponent
public static interface PlaceholderComponent.Builder extends Builder<PlaceholderComponent,PlaceholderComponent.Builder>
A builder forPlaceholderComponentobjects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PlaceholderComponentbuild()Builds and returns the placeholder.PlaceholderComponent.Buildercontext(PlaceholderContext context)Sets thePlaceholderContextthat will be provided to thePlaceholderParserto create theComponentwhenComponentLike.asComponent()()} is called.PlaceholderComponent.Builderparser(PlaceholderParser parser)Sets the token that represents aPlaceholderParserfor use in thisPlaceholderComponent.
-
-
-
Method Detail
-
parser
PlaceholderComponent.Builder parser(PlaceholderParser parser)
Sets the token that represents aPlaceholderParserfor use in thisPlaceholderComponent.- Parameters:
parser- ThePlaceholderParserto use- Returns:
- This, for chaining
-
context
PlaceholderComponent.Builder context(PlaceholderContext context)
Sets thePlaceholderContextthat will be provided to thePlaceholderParserto create theComponentwhenComponentLike.asComponent()()} is called.- Parameters:
context- ThePlaceholderContextto use.- Returns:
- This, for chaining
-
build
PlaceholderComponent build() throws IllegalStateException
Builds and returns the placeholder.- Specified by:
buildin interfaceAbstractBuilder<PlaceholderComponent>- Specified by:
buildin interfaceBuildable.Builder<PlaceholderComponent>- Returns:
- The appropriate
PlaceholderComponent - Throws:
IllegalStateException- if the builder has not been completed, or the associatedPlaceholderParsercould not validate the builtPlaceholderComponent, if applicable.
-
-