Interface PlaceholderComponent.Builder
-
- All Superinterfaces:
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 forPlaceholderComponent
objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PlaceholderComponent
build()
Builds and returns the placeholder.PlaceholderComponent.Builder
context(PlaceholderContext context)
Sets thePlaceholderContext
that will be provided to thePlaceholderParser
to create theComponent
whenComponentLike.asComponent()
()} is called.PlaceholderComponent.Builder
parser(PlaceholderParser parser)
Sets the token that represents aPlaceholderParser
for use in thisPlaceholderComponent
.
-
-
-
Method Detail
-
parser
PlaceholderComponent.Builder parser(PlaceholderParser parser)
Sets the token that represents aPlaceholderParser
for use in thisPlaceholderComponent
.- Parameters:
parser
- ThePlaceholderParser
to use- Returns:
- This, for chaining
-
context
PlaceholderComponent.Builder context(PlaceholderContext 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
PlaceholderComponent build() throws IllegalStateException
Builds and returns the placeholder.- Specified by:
build
in interfaceBuildable.Builder<PlaceholderComponent>
- Returns:
- The appropriate
PlaceholderComponent
- Throws:
IllegalStateException
- if the builder has not been completed, or the associatedPlaceholderParser
could not validate the builtPlaceholderComponent
, if applicable.
-
-