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 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 java.lang.IllegalStateException
Builds and returns the placeholder.- Specified by:
build
in interfaceAbstractBuilder<PlaceholderComponent>
- Specified by:
build
in interfaceBuildable.Builder<PlaceholderComponent>
- Returns:
- The appropriate
PlaceholderComponent
- Throws:
java.lang.IllegalStateException
- if the builder has not been completed, or the associatedPlaceholderParser
could not validate the builtPlaceholderComponent
, if applicable.
-
-