Package com.sun.msv.grammar.util
Class RefExpRemover
java.lang.Object
com.sun.msv.grammar.ExpressionCloner
com.sun.msv.grammar.util.RefExpRemover
- All Implemented Interfaces:
ExpressionVisitorExpression
removes all ReferenceExp from AGM.
when named expression is nullSet, it cannot be used.
by replacing ReferenceExp by its definition, those unavailable expressions
will be properly removed from AGM.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
private final Set
set of visited ElementExpsFields inherited from class com.sun.msv.grammar.ExpressionCloner
pool
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiononAttribute
(AttributeExp exp) onElement
(ElementExp exp) onRef
(ReferenceExp exp) Methods inherited from class com.sun.msv.grammar.ExpressionCloner
onAnyString, onChoice, onConcur, onData, onEpsilon, onInterleave, onList, onMixed, onNullSet, onOneOrMore, onSequence, onValue
-
Field Details
-
visitedElements
set of visited ElementExps -
recursive
private final boolean recursive
-
-
Constructor Details
-
RefExpRemover
- Parameters:
_recursive
-If true, this object behaves destructively. It recursively visits all the reachable expressions and removes ReferenceExps. In this process, this object changes the content model of ElementExps.
If false, this object doesn't visit the content models of child elements, therefore, it behaves non-destructively. Nothing in the original expression will be touched.
-
-
Method Details
-
onElement
-
onAttribute
-
onRef
-
onOther
-