schema2template.model
public final class MSVExpressionIterator extends Object implements Iterator<com.sun.msv.grammar.Expression>
Also has the ability to limit iteration to given subclasses and to limit subtree to the next element expressions below.
Modifier and Type | Field and Description |
---|---|
static boolean |
ALL_SUBTREE |
static boolean |
DIRECT_CHILDREN_ONLY |
int |
mCurrentExpressionDepth |
Constructor and Description |
---|
MSVExpressionIterator(com.sun.msv.grammar.Expression root)
Iterate through the expression tree
|
MSVExpressionIterator(com.sun.msv.grammar.Expression root,
Class desiredExpression)
Iterate through the expression tree, but only return objects of desiredExpression
|
MSVExpressionIterator(com.sun.msv.grammar.Expression root,
Class desiredExpression,
boolean onlyChildren)
Iterate..., but only return objects of desiredExpression and (if not onlyChildren)
don't go to children of ElementExp elements (this does not concern root node!).
|
public int mCurrentExpressionDepth
public static final boolean ALL_SUBTREE
public static final boolean DIRECT_CHILDREN_ONLY
public MSVExpressionIterator(com.sun.msv.grammar.Expression root)
root
- Expression rootpublic MSVExpressionIterator(com.sun.msv.grammar.Expression root, Class desiredExpression)
root
- Expression rootdesiredExpression
- Limit returned expressions to subclasses of desiredExpressionpublic MSVExpressionIterator(com.sun.msv.grammar.Expression root, Class desiredExpression, boolean onlyChildren)
Example: Root is table:table. If you choose onlyChildren=false and to limit desiredExpression=ElementExp.class, then you will get all direct element children of table:table, like table:table-row. But you won't get the children of table:table-row.
root
- Expression rootdesiredExpression
- Limit returned expressions to subclasses of desiredExpressiononlyChildren
- if only children should be returnedCopyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.