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 thePlaceholderContext
that will be provided to thePlaceholderParser
to create theComponent
whenComponentLike.asComponent()
()} is called.parser
(PlaceholderParser parser) Sets the token that represents aPlaceholderParser
for use in thisPlaceholderComponent
.
-
Method Details
-
parser
Sets the token that represents aPlaceholderParser
for use in thisPlaceholderComponent
.- Parameters:
parser
- ThePlaceholderParser
to use- Returns:
- This, for chaining
-
context
Sets thePlaceholderContext
that will be provided to thePlaceholderParser
to create theComponent
whenComponentLike.asComponent()
()} is called.- Parameters:
context
- ThePlaceholderContext
to use.- Returns:
- This, for chaining
-
build
Builds and returns the placeholder.- Specified by:
build
in interfaceAbstractBuilder<PlaceholderComponent>
- Returns:
- The appropriate
PlaceholderComponent
- Throws:
IllegalStateException
- if the builder has not been completed, or the associatedPlaceholderParser
could not validate the builtPlaceholderComponent
, if applicable.
-