public interface Matcher extends Rule, GraphNode<Matcher>
GraphNode
interface it can have submatchers.Modifier and Type | Method and Description |
---|---|
<R> R |
accept(MatcherVisitor<R> visitor)
Accepts the given matcher visitor.
|
boolean |
areMismatchesMemoed() |
boolean |
areSubnodesSuppressed() |
java.lang.String |
getLabel() |
MatcherContext |
getSubContext(MatcherContext context)
Creates a context for the matching of this matcher using the given parent context.
|
java.lang.Object |
getTag()
Retrieves a previously set tag object.
|
boolean |
hasCustomLabel() |
boolean |
isNodeSkipped() |
boolean |
isNodeSuppressed() |
<V> boolean |
match(MatcherContext<V> context)
Tries a match on the given MatcherContext.
|
void |
setTag(java.lang.Object tagObject)
Associates an arbitrary object with this matcher.
|
label, memoMismatches, skipNode, suppressNode, suppressSubnodes
getChildren
java.lang.String getLabel()
boolean hasCustomLabel()
boolean isNodeSuppressed()
boolean areSubnodesSuppressed()
boolean isNodeSkipped()
boolean areMismatchesMemoed()
MatcherContext getSubContext(MatcherContext context)
context
- the parent context<V> boolean match(MatcherContext<V> context)
context
- the MatcherContextvoid setTag(java.lang.Object tagObject)
tagObject
- the tag objectjava.lang.Object getTag()
<R> R accept(MatcherVisitor<R> visitor)
visitor
- the visitor