Package com.sun.msv.grammar.util
Class ExpressionFinder
- java.lang.Object
-
- com.sun.msv.grammar.util.ExpressionFinder
-
- All Implemented Interfaces:
ExpressionVisitorBoolean
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
-
-
Constructor Summary
Constructors Constructor Description ExpressionFinder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
onAnyString()
boolean
onAttribute(AttributeExp exp)
boolean
onChoice(ChoiceExp exp)
boolean
onConcur(ConcurExp exp)
boolean
onData(DataExp exp)
boolean
onElement(ElementExp exp)
boolean
onEpsilon()
boolean
onInterleave(InterleaveExp exp)
boolean
onList(ListExp exp)
boolean
onMixed(MixedExp exp)
boolean
onNullSet()
boolean
onOneOrMore(OneOrMoreExp exp)
boolean
onOther(OtherExp exp)
boolean
onRef(ReferenceExp exp)
boolean
onSequence(SequenceExp exp)
boolean
onValue(ValueExp exp)
-
-
-
Method Detail
-
onSequence
public boolean onSequence(SequenceExp exp)
- Specified by:
onSequence
in interfaceExpressionVisitorBoolean
-
onInterleave
public boolean onInterleave(InterleaveExp exp)
- Specified by:
onInterleave
in interfaceExpressionVisitorBoolean
-
onConcur
public boolean onConcur(ConcurExp exp)
- Specified by:
onConcur
in interfaceExpressionVisitorBoolean
-
onChoice
public boolean onChoice(ChoiceExp exp)
- Specified by:
onChoice
in interfaceExpressionVisitorBoolean
-
onAttribute
public boolean onAttribute(AttributeExp exp)
- Specified by:
onAttribute
in interfaceExpressionVisitorBoolean
-
onElement
public boolean onElement(ElementExp exp)
- Specified by:
onElement
in interfaceExpressionVisitorBoolean
-
onOneOrMore
public boolean onOneOrMore(OneOrMoreExp exp)
- Specified by:
onOneOrMore
in interfaceExpressionVisitorBoolean
-
onMixed
public boolean onMixed(MixedExp exp)
- Specified by:
onMixed
in interfaceExpressionVisitorBoolean
-
onList
public boolean onList(ListExp exp)
- Specified by:
onList
in interfaceExpressionVisitorBoolean
-
onRef
public boolean onRef(ReferenceExp exp)
- Specified by:
onRef
in interfaceExpressionVisitorBoolean
-
onOther
public boolean onOther(OtherExp exp)
- Specified by:
onOther
in interfaceExpressionVisitorBoolean
-
onEpsilon
public boolean onEpsilon()
- Specified by:
onEpsilon
in interfaceExpressionVisitorBoolean
-
onNullSet
public boolean onNullSet()
- Specified by:
onNullSet
in interfaceExpressionVisitorBoolean
-
onAnyString
public boolean onAnyString()
- Specified by:
onAnyString
in interfaceExpressionVisitorBoolean
-
onData
public boolean onData(DataExp exp)
- Specified by:
onData
in interfaceExpressionVisitorBoolean
-
onValue
public boolean onValue(ValueExp exp)
- Specified by:
onValue
in interfaceExpressionVisitorBoolean
-
-