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