public final class DataGeneratorVariable
extends java.lang.Object
DataGeneratorVariable
class describes a variable passed to a data generator
in a query. Generated data must be assigned to variables.Constructor and Description |
---|
DataGeneratorVariable(java.lang.String name,
ru.ispras.fortress.expression.Node node)
Constructs a variable with the specified name described with the specified
Node object. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
Returns the variable name.
|
int |
getSize()
Returns variable bit size.
|
ru.ispras.fortress.data.DataType |
getType()
Returns the variable data type.
|
ru.ispras.fortress.expression.NodeValue |
getValue()
Returns a node describing the variable value.
|
boolean |
isType(ru.ispras.fortress.data.DataType type)
Checks whether the variable has the specified type
(types are compared on the
DataType level). |
boolean |
isType(ru.ispras.fortress.data.DataTypeId typeId)
Checks whether the variable has the specified type
(types are compared on the
DataTypeId level). |
boolean |
isUnknown()
Checks whether the variable is an unknown variable that must have its value assigned.
|
public DataGeneratorVariable(java.lang.String name, ru.ispras.fortress.expression.Node node)
Node
object.name
- Variable name.node
- Node describing the variable.java.lang.IllegalArgumentException
- if any of the parameters is null
;
if the node is not a value or a variable; if the variable data type
is not a bit vector.public java.lang.String getName()
public ru.ispras.fortress.data.DataType getType()
public boolean isType(ru.ispras.fortress.data.DataTypeId typeId)
DataTypeId
level).typeId
- DataTypeId
object the data type is to be compared to.true
if the variable type matches the type specified by
the typeId
argument or false
otherwise.public boolean isType(ru.ispras.fortress.data.DataType type)
DataType
level).type
- DataType
object the data type is to be compared to.true
if the variable type matches the type specified by
the type
argument or false
otherwise.public int getSize()
public boolean isUnknown()
true
if this is an unknown variable or false
otherwise.public ru.ispras.fortress.expression.NodeValue getValue()
java.lang.IllegalStateException
- if the variable has no value.