com.sun.msv.generator
Class ElementDeclCollector
java.lang.Object
com.sun.msv.grammar.util.ExpressionWalker
com.sun.msv.generator.ElementDeclCollector
- All Implemented Interfaces:
- ExpressionVisitorVoid
public class ElementDeclCollector
- extends ExpressionWalker
collects all distinct element declaration in the grammar.
As a side effect, it also collects all distinct attribute declarations.
- Author:
- Kohsuke KAWAGUCHI
Methods inherited from class com.sun.msv.grammar.util.ExpressionWalker |
onAnyString, onBinExp, onChoice, onData, onEpsilon, onInterleave, onList, onMixed, onNullSet, onOneOrMore, onOther, onRef, onSequence, onValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
onConcur
public void onConcur(ConcurExp exp)
- Specified by:
onConcur
in interface ExpressionVisitorVoid
- Overrides:
onConcur
in class ExpressionWalker
onElement
public void onElement(ElementExp exp)
- Specified by:
onElement
in interface ExpressionVisitorVoid
- Overrides:
onElement
in class ExpressionWalker
onAttribute
public void onAttribute(AttributeExp exp)
- Specified by:
onAttribute
in interface ExpressionVisitorVoid
- Overrides:
onAttribute
in class ExpressionWalker
collect
public static Set[] collect(Expression exp)
- collects all element and attribute declarations.
- Returns:
- r[0] : set of all distinct ElementExps.
r[1] : set of all distinct AttributeExps.
MSV