com.sun.msv.generator
Class ElementDeclCollector

java.lang.Object
  extended by com.sun.msv.grammar.util.ExpressionWalker
      extended by com.sun.msv.generator.ElementDeclCollector
All Implemented Interfaces:
com.sun.msv.grammar.ExpressionVisitorVoid

public class ElementDeclCollector
extends com.sun.msv.grammar.util.ExpressionWalker

collects all distinct element declaration in the grammar. As a side effect, it also collects all distinct attribute declarations.

Author:
Kohsuke KAWAGUCHI

Method Summary
static Set[] collect(com.sun.msv.grammar.Expression exp)
          collects all element and attribute declarations.
 void onAttribute(com.sun.msv.grammar.AttributeExp exp)
           
 void onConcur(com.sun.msv.grammar.ConcurExp exp)
           
 void onElement(com.sun.msv.grammar.ElementExp exp)
           
 
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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

onConcur

public void onConcur(com.sun.msv.grammar.ConcurExp exp)
Specified by:
onConcur in interface com.sun.msv.grammar.ExpressionVisitorVoid
Overrides:
onConcur in class com.sun.msv.grammar.util.ExpressionWalker

onElement

public void onElement(com.sun.msv.grammar.ElementExp exp)
Specified by:
onElement in interface com.sun.msv.grammar.ExpressionVisitorVoid
Overrides:
onElement in class com.sun.msv.grammar.util.ExpressionWalker

onAttribute

public void onAttribute(com.sun.msv.grammar.AttributeExp exp)
Specified by:
onAttribute in interface com.sun.msv.grammar.ExpressionVisitorVoid
Overrides:
onAttribute in class com.sun.msv.grammar.util.ExpressionWalker

collect

public static Set[] collect(com.sun.msv.grammar.Expression exp)
collects all element and attribute declarations.

Returns:
r[0] : set of all distinct ElementExps.
r[1] : set of all distinct AttributeExps.