public final class NodeBinding extends Node
NodeBinding
class represents set of substitutions to be considered in underlying
expression subtree. List of bound variables considered immutable.Modifier and Type | Class and Description |
---|---|
static class |
NodeBinding.BoundVariable
The
NodeBinding.BoundVariable class represents key-value binding pair. |
Constructor and Description |
---|
NodeBinding(Node expression,
java.util.List<NodeBinding.BoundVariable> bindings)
Creates a node based on expression and list of bindings.
|
NodeBinding(Node expression,
NodeBinding.BoundVariable... bindings)
Constructs a node based on an expression and a variable number of bindings.
|
Modifier and Type | Method and Description |
---|---|
NodeBinding |
bindTo(Node expression)
Create binding node with same bindings for given expression.
|
static NodeBinding.BoundVariable |
bindVariable(NodeVariable variable,
Node value)
Create bound variable using NodeVariable object and expression.
|
Node |
deepCopy()
Creates a deep copy of the current objects.
|
boolean |
equals(java.lang.Object rhs) |
java.util.List<NodeBinding.BoundVariable> |
getBindings()
Returns list of bound variables associated with the node.
|
DataType |
getDataType()
Returns an object that describes the type of the value referred by the node.
|
Node |
getExpression()
Returns underlying expression subtree.
|
int |
hashCode() |
java.lang.String |
toString() |
getDataTypeId, getKind, getUserData, isType, isType, isType, isType, setUserData
public NodeBinding(Node expression, java.util.List<NodeBinding.BoundVariable> bindings)
expression
- Expression subtree.bindings
- List of bound variables.public NodeBinding(Node expression, NodeBinding.BoundVariable... bindings)
NodeBinding(Node expression, List<BoundVariable> bindings)
.expression
- Expression subtree.bindings
- Bound variables.public java.util.List<NodeBinding.BoundVariable> getBindings()
public Node getExpression()
public Node deepCopy()
Node
public NodeBinding bindTo(Node expression)
expression
- An expression subtree.public static NodeBinding.BoundVariable bindVariable(NodeVariable variable, Node value)
variable
- An object representing bound variable.value
- A bound value.public DataType getDataType()
Node
getDataType
in class Node
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object rhs)
equals
in class java.lang.Object