| Constructor and Description |
|---|
SimpleSubstitution(java.lang.String tag)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendTo(java.lang.StringBuilder collector,
ValueProvider valueProvider)
Append the resolved template to the given collector.
|
void |
check(ValueProvider valueProvider,
FStack<TagReference> insertionStack,
java.util.function.Consumer<FStack<TagReference>> resolvedTagHandler,
java.util.function.Consumer<FStack<TagReference>> unresolvedTagHandler)
Run a check with the given value provider.
|
java.lang.String |
getTag()
Get the key of this substitution.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcollectUnresolvedTags, resolvepublic SimpleSubstitution(@NotNull java.lang.String tag)
tag - substitution tag@NotNull public java.lang.String getTag()
public void appendTo(@NotNull java.lang.StringBuilder collector, @NotNull ValueProvider valueProvider)
Templatepublic void check(@NotNull ValueProvider valueProvider, @NotNull FStack<TagReference> insertionStack, @NotNull java.util.function.Consumer<FStack<TagReference>> resolvedTagHandler, @NotNull java.util.function.Consumer<FStack<TagReference>> unresolvedTagHandler)
TemplateInstead of throwing after the first problem this method is expected to check as much as possible.
check in interface TemplatevalueProvider - value provider checked against this templateinsertionStack - stack of multiple insertions before the level of this check is reachedresolvedTagHandler - collector for successfully resolved template tagsunresolvedTagHandler - collector for unresolvable template tags, if multiple tags fail to be resolved
tags in lower levels cannot be checkedpublic java.lang.String toString()
toString in class java.lang.Object