com.sun.msv.grammar.util
Class ExpressionFinder
java.lang.Object
com.sun.msv.grammar.util.ExpressionFinder
- All Implemented Interfaces:
- ExpressionVisitorBoolean
- Direct Known Subclasses:
- StringCareLevelCalculator
public abstract class ExpressionFinder
- extends Object
- implements ExpressionVisitorBoolean
Base class for "finding" something from an expression.
This class visits all reachable expressions and returns boolean.
In any binary expression, if one branch returns true, then the binary
expression itself returns true. Thus it can be used to find something
from an expression.
Note that unless the derived class do something, this implementation
will recurse infinitely.
- Author:
- Kohsuke KAWAGUCHI
ExpressionFinder
public ExpressionFinder()
onSequence
public boolean onSequence(SequenceExp exp)
- Specified by:
onSequence
in interface ExpressionVisitorBoolean
onInterleave
public boolean onInterleave(InterleaveExp exp)
- Specified by:
onInterleave
in interface ExpressionVisitorBoolean
onConcur
public boolean onConcur(ConcurExp exp)
- Specified by:
onConcur
in interface ExpressionVisitorBoolean
onChoice
public boolean onChoice(ChoiceExp exp)
- Specified by:
onChoice
in interface ExpressionVisitorBoolean
onAttribute
public boolean onAttribute(AttributeExp exp)
- Specified by:
onAttribute
in interface ExpressionVisitorBoolean
onElement
public boolean onElement(ElementExp exp)
- Specified by:
onElement
in interface ExpressionVisitorBoolean
onOneOrMore
public boolean onOneOrMore(OneOrMoreExp exp)
- Specified by:
onOneOrMore
in interface ExpressionVisitorBoolean
onMixed
public boolean onMixed(MixedExp exp)
- Specified by:
onMixed
in interface ExpressionVisitorBoolean
onList
public boolean onList(ListExp exp)
- Specified by:
onList
in interface ExpressionVisitorBoolean
onRef
public boolean onRef(ReferenceExp exp)
- Specified by:
onRef
in interface ExpressionVisitorBoolean
onOther
public boolean onOther(OtherExp exp)
- Specified by:
onOther
in interface ExpressionVisitorBoolean
onEpsilon
public boolean onEpsilon()
- Specified by:
onEpsilon
in interface ExpressionVisitorBoolean
onNullSet
public boolean onNullSet()
- Specified by:
onNullSet
in interface ExpressionVisitorBoolean
onAnyString
public boolean onAnyString()
- Specified by:
onAnyString
in interface ExpressionVisitorBoolean
onData
public boolean onData(DataExp exp)
- Specified by:
onData
in interface ExpressionVisitorBoolean
onValue
public boolean onValue(ValueExp exp)
- Specified by:
onValue
in interface ExpressionVisitorBoolean