|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jpaul.RegExps.RegExp.Visitor<A,Res>
public abstract static class RegExp.Visitor<A,Res>
Instance of the visitor pattern for RegExp
s.
Usage of this pattern avoids clumsy sequences of several
instanceof
tests. A visitor takers a regular
expression over symbols of type A
and returns a
result of type Res
.
Constructor Summary | |
---|---|
RegExp.Visitor()
|
Method Summary | |
---|---|
Res |
visit(RegExp.Atomic<A> re)
Subclasses should override this method to define special processing for an Atomic regular expression. |
Res |
visit(RegExp.Concat<A> re)
Subclasses should override this method to define special processing for a Concat regular expression. |
Res |
visit(RegExp.EmptyStr<A> re)
Subclasses should override this method to define special processing for an EmptyStr regular expression. |
Res |
visit(RegExp.None<A> re)
Subclasses should override this method to define special processing for a None regular expression. |
Res |
visit(RegExp.Star<A> re)
Subclasses should override this method to define special processing for a Star regular expression. |
Res |
visit(RegExp.Union<A> re)
Subclasses should override this method to define special processing for a Union regular expression. |
Res |
visit(RegExp<A> re)
Default code to execute for a regular expression. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RegExp.Visitor()
Method Detail |
---|
public Res visit(RegExp.None<A> re)
None
regular expression.
public Res visit(RegExp.Atomic<A> re)
Atomic
regular expression.
public Res visit(RegExp.EmptyStr<A> re)
EmptyStr
regular expression.
public Res visit(RegExp.Union<A> re)
Union
regular expression.
public Res visit(RegExp.Concat<A> re)
Concat
regular expression.
public Res visit(RegExp.Star<A> re)
Star
regular expression.
public Res visit(RegExp<A> re)
RegExp
subclass, this code will be executed
instead.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |