public class StringMatcher extends SequenceMatcher
SequenceMatcher specialization for sequences of CharMatchers. Performs fast string matching if the
current context has it enabled.| Modifier and Type | Field and Description |
|---|---|
char[] |
characters |
| Constructor and Description |
|---|
StringMatcher(Rule[] charMatchers,
char[] characters) |
| Modifier and Type | Method and Description |
|---|---|
T |
defaultLabel(java.lang.String defaultLabel) |
java.lang.String |
getLabel() |
boolean |
hasCustomLabel() |
boolean |
match(MatcherContext context)
Tries a match on the given MatcherContext.
|
acceptareMismatchesMemoed, areSubnodesSuppressed, getSubContext, getTag, isNodeSkipped, isNodeSuppressed, label, memoMismatches, setTag, skipNode, suppressNode, suppressSubnodes, toStringgetChildrenequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetChildrenpublic StringMatcher(Rule[] charMatchers, char[] characters)
public java.lang.String getLabel()
public boolean hasCustomLabel()
hasCustomLabel in interface Matcherpublic boolean match(MatcherContext context)
Matchermatch in interface Matchermatch in class SequenceMatchercontext - the MatcherContextpublic T defaultLabel(java.lang.String defaultLabel)