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, reset
PlaceholderParser.Builder plugin(Object plugin)
PluginContainer
that this parser is
being provided by.plugin
- The plugin or PluginContainer
PlaceholderParser.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 Text
parser
- The functionPlaceholderParser build() throws IllegalStateException
PlaceholderParser
IllegalStateException
- if the plugin, ID or parser has not
been has not been specified.