public static interface PlaceholderParser.Builder extends ResettableBuilder<PlaceholderParser,PlaceholderParser.Builder>
PlaceholderParser| Modifier and Type | Method and Description |
|---|---|
PlaceholderParser |
build()
Builds a
PlaceholderParser |
PlaceholderParser.Builder |
id(String id)
The un-namespaced ID of the parser.
|
PlaceholderParser.Builder |
name(String name)
The human friendly name of this parser
|
PlaceholderParser.Builder |
parser(Function<PlaceholderContext,Text> parser)
The function that converts a
PlaceholderContext to Text |
PlaceholderParser.Builder |
plugin(Object plugin)
The plugin instance or
PluginContainer that this parser is
being provided by. |
from, resetPlaceholderParser.Builder plugin(Object plugin)
PluginContainer that this parser is
being provided by.plugin - The plugin or PluginContainerPlaceholderParser.Builder id(String id)
This will reject any ID that contains a colon.
id - The un-namespaced IDPlaceholderParser.Builder name(String name)
name - The namePlaceholderParser.Builder parser(Function<PlaceholderContext,Text> parser)
PlaceholderContext to Textparser - The functionPlaceholderParser build() throws IllegalStateException
PlaceholderParserIllegalStateException - if the plugin, ID or parser has not
been has not been specified.