public abstract class AbstractMatcher extends ImmutableGraphNode<Matcher> implements Matcher, Cloneable
Matcher
s.Modifier | Constructor and Description |
---|---|
protected |
AbstractMatcher(Rule[] subRules,
String label) |
protected |
AbstractMatcher(Rule subRule,
String label) |
protected |
AbstractMatcher(String label) |
Modifier and Type | Method and Description |
---|---|
String |
getLabel() |
<V> MatcherContext<V> |
getSubContext(MatcherContext<V> context)
Creates a context for the matching of this matcher using the given parent
context.
|
boolean |
hasCustomLabel() |
AbstractMatcher |
label(String label)
Attaches a label to this Rule.
|
String |
toString() |
getChildren
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getChildren
protected AbstractMatcher(String label)
public String getLabel()
public boolean hasCustomLabel()
hasCustomLabel
in interface Matcher
public final AbstractMatcher label(String label)
Rule
public <V> MatcherContext<V> getSubContext(MatcherContext<V> context)
Matcher
getSubContext
in interface Matcher
context
- the parent context