|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derby.impl.sql.compile.HasVariantValueNodeVisitor
public class HasVariantValueNodeVisitor
Find out if we have a value node with variant type less than what the caller desires, anywhere below us. Stop traversal as soon as we find one. This is used in two places: one to check the values clause of an insert statement; i.e
insert into
| Field Summary | |
|---|---|
private boolean |
hasVariant
|
private boolean |
ignoreParameters
|
private int |
variantType
|
| Constructor Summary | |
|---|---|
HasVariantValueNodeVisitor()
Construct a visitor |
|
HasVariantValueNodeVisitor(int variantType,
boolean ignoreParameters)
Construct a visitor. |
|
| Method Summary | |
|---|---|
boolean |
hasVariant()
Indicate whether we found the node in question |
boolean |
skipChildren(Visitable node)
Method that is called to indicate whether we should skip all nodes below this node for traversal. |
boolean |
stopTraversal()
Stop traversal if we found the target node |
Visitable |
visit(Visitable node)
If we have found the target node, we are done. |
boolean |
visitChildrenFirst(Visitable node)
Method that is called to see if visit() should be called on
the children of node before it is called on node itself. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private boolean hasVariant
private int variantType
private boolean ignoreParameters
| Constructor Detail |
|---|
public HasVariantValueNodeVisitor()
public HasVariantValueNodeVisitor(int variantType,
boolean ignoreParameters)
variantType - the type of variance we consider
variantignoreParameters - should I ignore parameter nodes?| Method Detail |
|---|
public Visitable visit(Visitable node) throws StandardException
node - the node to process
StandardException - on errorpublic boolean skipChildren(Visitable node)
VisitorDiffers from stopTraversal() in that it only affects subtrees, rather than the entire traversal.
skipChildren in interface Visitornode - the node to process
public boolean visitChildrenFirst(Visitable node)
Visitorvisit() should be called on
the children of node before it is called on node itself.
If this method always returns true, the visitor will walk the
tree bottom-up. If it always returns false, the tree is visited
top-down.
visitChildrenFirst in interface Visitornode - the top node of a sub-tree about to be visited
true if node's children should be visited
before node, false otherwisepublic boolean stopTraversal()
stopTraversal in interface Visitorpublic boolean hasVariant()
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||