public class DoWithMatcherVisitor extends DefaultMatcherVisitor<java.lang.Void>
DoWithMatcherVisitor.Action
against a whole matcher hierarchy in a depth-first manner.
Potential cycles are detected and not rerun.Modifier and Type | Class and Description |
---|---|
static interface |
DoWithMatcherVisitor.Action |
Modifier and Type | Field and Description |
---|---|
private DoWithMatcherVisitor.Action |
action |
private java.util.Set<Matcher> |
visited |
Constructor and Description |
---|
DoWithMatcherVisitor(DoWithMatcherVisitor.Action action) |
Modifier and Type | Method and Description |
---|---|
java.lang.Void |
defaultValue(AbstractMatcher matcher)
Returns the default value for all visiting methods that have not been overridden.
|
java.lang.Void |
visit(FirstOfMatcher matcher) |
java.lang.Void |
visit(OneOrMoreMatcher matcher) |
java.lang.Void |
visit(OptionalMatcher matcher) |
java.lang.Void |
visit(SequenceMatcher matcher) |
java.lang.Void |
visit(TestMatcher matcher) |
java.lang.Void |
visit(TestNotMatcher matcher) |
java.lang.Void |
visit(ZeroOrMoreMatcher matcher) |
private final DoWithMatcherVisitor.Action action
private final java.util.Set<Matcher> visited
public DoWithMatcherVisitor(DoWithMatcherVisitor.Action action)
public java.lang.Void visit(FirstOfMatcher matcher)
visit
in interface MatcherVisitor<java.lang.Void>
visit
in class DefaultMatcherVisitor<java.lang.Void>
public java.lang.Void visit(SequenceMatcher matcher)
visit
in interface MatcherVisitor<java.lang.Void>
visit
in class DefaultMatcherVisitor<java.lang.Void>
public java.lang.Void visit(OneOrMoreMatcher matcher)
visit
in interface MatcherVisitor<java.lang.Void>
visit
in class DefaultMatcherVisitor<java.lang.Void>
public java.lang.Void visit(OptionalMatcher matcher)
visit
in interface MatcherVisitor<java.lang.Void>
visit
in class DefaultMatcherVisitor<java.lang.Void>
public java.lang.Void visit(TestMatcher matcher)
visit
in interface MatcherVisitor<java.lang.Void>
visit
in class DefaultMatcherVisitor<java.lang.Void>
public java.lang.Void visit(TestNotMatcher matcher)
visit
in interface MatcherVisitor<java.lang.Void>
visit
in class DefaultMatcherVisitor<java.lang.Void>
public java.lang.Void visit(ZeroOrMoreMatcher matcher)
visit
in interface MatcherVisitor<java.lang.Void>
visit
in class DefaultMatcherVisitor<java.lang.Void>
public java.lang.Void defaultValue(AbstractMatcher matcher)
DefaultMatcherVisitor
defaultValue
in class DefaultMatcherVisitor<java.lang.Void>
matcher
- the matcher