Constructor and Description |
---|
ProxyMatcher() |
Modifier and Type | Method and Description |
---|---|
void |
arm(Matcher target)
Supplies this ProxyMatcher with its underlying delegate.
|
List<Matcher> |
getChildren()
Returns the sub nodes of this node.
|
String |
getLabel() |
<V> MatcherContext<V> |
getSubContext(MatcherContext<V> context)
Creates a context for the matching of this matcher using the given parent
context.
|
MatcherType |
getType()
Returns the type of this matcher
|
boolean |
hasCustomLabel() |
Rule |
label(String label)
Attaches a label to this Rule.
|
<V> boolean |
match(MatcherContext<V> context)
Tries a match on the given MatcherContext.
|
void |
setLabel(String label) |
String |
toString() |
static Matcher |
unwrap(Matcher matcher)
Retrieves the innermost Matcher that is not a ProxyMatcher.
|
public MatcherType getType()
Matcher
getType
in interface Matcher
MatcherType
public List<Matcher> getChildren()
GraphNode
getChildren
in interface GraphNode<Matcher>
public void setLabel(String label)
public <V> boolean match(MatcherContext<V> context)
Matcher
public String getLabel()
public boolean hasCustomLabel()
hasCustomLabel
in interface Matcher
public Rule label(String label)
Rule
public void arm(Matcher target)
target
- the Matcher to delegate topublic static Matcher unwrap(Matcher matcher)
matcher
- the matcher to unwrappublic <V> MatcherContext<V> getSubContext(MatcherContext<V> context)
Matcher
getSubContext
in interface Matcher
context
- the parent context