Class ExportedHedgeRuleChecker
java.lang.Object
com.sun.msv.reader.relax.core.checker.ExportedHedgeRuleChecker
- All Implemented Interfaces:
ExpressionVisitorBoolean
,RELAXExpressionVisitorBoolean
the purpose of this function object is to make sure
that the expression does not contain references to modules
other than one specified by this variable.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
onAttPool
(AttPoolClause exp) boolean
onAttribute
(AttributeExp exp) boolean
boolean
boolean
boolean
onElement
(ElementExp exp) boolean
boolean
boolean
onHedgeRules
(HedgeRules exp) boolean
boolean
boolean
boolean
boolean
onOneOrMore
(OneOrMoreExp exp) boolean
boolean
onRef
(ReferenceExp exp) boolean
onSequence
(SequenceExp exp) boolean
boolean
private void
takeSnapshot
(ReferenceExp lastExp) takes a snap shot of traversal to this.errorSnapshot so that the user will know what references cause this problem.
-
Field Details
-
module
-
traversalStack
traversal stack. This object keeps track of how hedgeRules are visited so that detailed error message can be provided when an error is found. Say if you start from hr1, hr1 refers hr2, hr2 refers hr3, and hr3 has a reference to the other module, this stack is {hr1,hr2,hr3} when an error is found. -
errorSnapshot
-
-
Constructor Details
-
ExportedHedgeRuleChecker
-
-
Method Details
-
onAttribute
- Specified by:
onAttribute
in interfaceExpressionVisitorBoolean
-
onChoice
- Specified by:
onChoice
in interfaceExpressionVisitorBoolean
-
onSequence
- Specified by:
onSequence
in interfaceExpressionVisitorBoolean
-
onElement
- Specified by:
onElement
in interfaceExpressionVisitorBoolean
-
onOneOrMore
- Specified by:
onOneOrMore
in interfaceExpressionVisitorBoolean
-
onMixed
- Specified by:
onMixed
in interfaceExpressionVisitorBoolean
-
onRef
- Specified by:
onRef
in interfaceExpressionVisitorBoolean
-
onOther
- 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
- Specified by:
onData
in interfaceExpressionVisitorBoolean
-
onValue
- Specified by:
onValue
in interfaceExpressionVisitorBoolean
-
onAttPool
- Specified by:
onAttPool
in interfaceRELAXExpressionVisitorBoolean
-
onTag
- Specified by:
onTag
in interfaceRELAXExpressionVisitorBoolean
-
onInterleave
- Specified by:
onInterleave
in interfaceExpressionVisitorBoolean
-
onConcur
- Specified by:
onConcur
in interfaceExpressionVisitorBoolean
-
onList
- Specified by:
onList
in interfaceExpressionVisitorBoolean
-
onElementRules
- Specified by:
onElementRules
in interfaceRELAXExpressionVisitorBoolean
-
onHedgeRules
- Specified by:
onHedgeRules
in interfaceRELAXExpressionVisitorBoolean
-
takeSnapshot
takes a snap shot of traversal to this.errorSnapshot so that the user will know what references cause this problem.
-