public class SqlTypeSetterVisitor extends java.lang.Object implements Visitor<com.rabbitmq.jms.parse.sql.SqlTreeNode>
SqlExpressionType of the children nodes.
To type a whole tree this can be applied to it by visiting the subtrees in ‘post-order’; each node visited
then has its child nodes already visited and therefore typed. In consequence, this visitor does nothing in
its Visitor.visitBefore(Object, Object[]) implementation.
The visitor has a (final) map state which pre-specifies the SqlExpressionType of some identifiers,
otherwise identifiers are of type SqlExpressionType.ANY.
| Constructor and Description |
|---|
SqlTypeSetterVisitor() |
SqlTypeSetterVisitor(java.util.Map<java.lang.String,SqlExpressionType> identifierType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
visitAfter(com.rabbitmq.jms.parse.sql.SqlTreeNode parent,
com.rabbitmq.jms.parse.sql.SqlTreeNode[] children)
Visit a place in the tree: the Node for this place in the tree, and an array of
Nodes of the immediate children, are passed as parameters. |
boolean |
visitBefore(com.rabbitmq.jms.parse.sql.SqlTreeNode parent,
com.rabbitmq.jms.parse.sql.SqlTreeNode[] children)
Visit a place in the tree: the Node for this place in the tree, and an array of
Nodes of the immediate children, are passed as parameters. |
public SqlTypeSetterVisitor(java.util.Map<java.lang.String,SqlExpressionType> identifierType)
public SqlTypeSetterVisitor()
public boolean visitBefore(com.rabbitmq.jms.parse.sql.SqlTreeNode parent,
com.rabbitmq.jms.parse.sql.SqlTreeNode[] children)
VisitorNodes of the immediate children, are passed as parameters.visitBefore in interface Visitor<com.rabbitmq.jms.parse.sql.SqlTreeNode>parent - - the node (value) of the parent at this point in the tree; can be updated.children - - array of the nodes of the children of this parent (can be zero-length array; must not be null).true or false - interpreted by the caller (typically a tree traversal algorithm).public boolean visitAfter(com.rabbitmq.jms.parse.sql.SqlTreeNode parent,
com.rabbitmq.jms.parse.sql.SqlTreeNode[] children)
VisitorNodes of the immediate children, are passed as parameters.visitAfter in interface Visitor<com.rabbitmq.jms.parse.sql.SqlTreeNode>parent - - the node (value) of the parent at this point in the tree; can be updated.children - - array of the nodes of the children of this parent (can be zero-length array; must not be null).true or false - interpreted by the caller (typically a tree traversal algorithm).Copyright © 2023. All rights reserved.