Package com.sun.msv.verifier.regexp
Class StringCareLevelCalculator
- java.lang.Object
-
- com.sun.msv.verifier.regexp.StringCareLevelCalculator
-
- All Implemented Interfaces:
ExpressionVisitor
public class StringCareLevelCalculator extends Object implements ExpressionVisitor
calculates how character literals should be treated. This class is thread-safe: multiple threads can simultaneously access the same instance. Note that there is no guarantee that the derived class is thread-safe.- Author:
- Kohsuke KAWAGUCHI
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringCareLevelCalculator
theInstance
singleton instance.
-
Constructor Summary
Constructors Modifier Constructor Description protected
StringCareLevelCalculator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
calc(Expression exp)
Object
onAnyString()
Object
onAttribute(AttributeExp exp)
Object
onChoice(ChoiceExp exp)
Object
onConcur(ConcurExp exp)
Object
onData(DataExp exp)
Object
onElement(ElementExp exp)
Object
onEpsilon()
Object
onInterleave(InterleaveExp p)
Object
onList(ListExp exp)
Object
onMixed(MixedExp exp)
Object
onNullSet()
Object
onOneOrMore(OneOrMoreExp exp)
Object
onOther(OtherExp exp)
Object
onRef(ReferenceExp exp)
Object
onSequence(SequenceExp exp)
Object
onValue(ValueExp exp)
-
-
-
Field Detail
-
theInstance
protected static final StringCareLevelCalculator theInstance
singleton instance.
-
-
Method Detail
-
onAttribute
public Object onAttribute(AttributeExp exp)
- Specified by:
onAttribute
in interfaceExpressionVisitor
-
onElement
public Object onElement(ElementExp exp)
- Specified by:
onElement
in interfaceExpressionVisitor
-
onMixed
public Object onMixed(MixedExp exp)
- Specified by:
onMixed
in interfaceExpressionVisitor
-
onList
public Object onList(ListExp exp)
- Specified by:
onList
in interfaceExpressionVisitor
-
onAnyString
public Object onAnyString()
- Specified by:
onAnyString
in interfaceExpressionVisitor
-
onData
public Object onData(DataExp exp)
- Specified by:
onData
in interfaceExpressionVisitor
-
onValue
public Object onValue(ValueExp exp)
- Specified by:
onValue
in interfaceExpressionVisitor
-
onChoice
public Object onChoice(ChoiceExp exp)
- Specified by:
onChoice
in interfaceExpressionVisitor
-
onOneOrMore
public Object onOneOrMore(OneOrMoreExp exp)
- Specified by:
onOneOrMore
in interfaceExpressionVisitor
-
onRef
public Object onRef(ReferenceExp exp)
- Specified by:
onRef
in interfaceExpressionVisitor
-
onOther
public Object onOther(OtherExp exp)
- Specified by:
onOther
in interfaceExpressionVisitor
-
onEpsilon
public Object onEpsilon()
- Specified by:
onEpsilon
in interfaceExpressionVisitor
-
onNullSet
public Object onNullSet()
- Specified by:
onNullSet
in interfaceExpressionVisitor
-
onSequence
public Object onSequence(SequenceExp exp)
- Specified by:
onSequence
in interfaceExpressionVisitor
-
onConcur
public Object onConcur(ConcurExp exp)
- Specified by:
onConcur
in interfaceExpressionVisitor
-
onInterleave
public Object onInterleave(InterleaveExp p)
- Specified by:
onInterleave
in interfaceExpressionVisitor
-
calc
public static int calc(Expression exp)
-
-