- All Superinterfaces:
ComponentLikethat can be used in
Componentbuilding methods that represents a placeholder in text.
Such placeholders will generally be built from tokenized strings, however these objects make no assumption about the format of text templating. Such a system can therefore be used by other templating engines without conforming to a particular standard.
PlaceholderContext is fixed when this object is created, but
PlaceholderParser.parse(PlaceholderContext) is not called until
asComponent() is called. Thus, any
Component object that is
created will reflect the time that the
Component object was
requested, and not when this object itself was created. It therefore follows
that implementations must not cache the result of
unless it is known that the supplied parser is not sensitive
to the time of invocation.
builderstatic PlaceholderComponent.Builder builder()
contextPlaceholderContext context()Gets the
PlaceholderContextthat is to be supplied to the
PlaceholderParserto create the
asComponentdefault @NonNull Component asComponent()Creates a
Componentfrom the supplied
PlaceholderParserin the context of the supplied