com.sun.msv.generator
Class ElementDeclCollector

java.lang.Object
  extended bycom.sun.msv.grammar.util.ExpressionWalker
      extended bycom.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)

onElement

public void onElement(com.sun.msv.grammar.ElementExp exp)

onAttribute

public void onAttribute(com.sun.msv.grammar.AttributeExp exp)

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.