| Constructor and Description |
|---|
Variable(String name,
IExpression boundExpression) |
Variable(String name,
IModelElement boundElement) |
| Modifier and Type | Method and Description |
|---|---|
IModelElement |
getBoundElement()
Return the model element bound to this variable.
|
IExpression |
getBoundExpression()
Return the complex expression bound to this variable.
|
INRLAstNode |
getDeclarationNode()
Helper node for error reporting - where the variable was declared
|
String |
getName()
Return the variable name.
|
NRLDataType |
getNRLDataType()
Return a type constant from the
NRLDataType class, indicating the
data type of the variable. |
Object |
getUserData(String key)
Return a named user data object associated with this variable.
|
boolean |
isBoundToElement()
Return true if the variable is bound to a model element, false if it is
bound to a complex expression
|
void |
setDeclarationNode(INRLAstNode declarationNode)
Helper node for error reporting - where the variable was declared
|
void |
setNRLDataType(NRLDataType type)
Assign an NRL type to this variable.
|
void |
setUserData(String key,
Object data)
Associate user data with this variable node, under a given key.
|
public Variable(String name, IExpression boundExpression)
public Variable(String name, IModelElement boundElement)
public IModelElement getBoundElement()
IVariableIVariable.isBoundToElement() returns false for this variable, then this
method will return null.getBoundElement in interface IVariablepublic IExpression getBoundExpression()
IVariableIVariable.isBoundToElement() returns true for this variable, then this
will return null, else it returns the expression.getBoundExpression in interface IVariablepublic INRLAstNode getDeclarationNode()
public String getName()
IVariablepublic NRLDataType getNRLDataType()
IVariableNRLDataType class, indicating the
data type of the variable.
This can only be called once a type inference algorithm has been applied to the variable or the entire AST.
getNRLDataType in interface IVariablepublic Object getUserData(String key)
IVariablegetUserData in interface IVariablekey - the key identifying the datapublic boolean isBoundToElement()
IVariableisBoundToElement in interface IVariablepublic void setDeclarationNode(INRLAstNode declarationNode)
declarationNode - the nodepublic void setNRLDataType(NRLDataType type)
IVariablesetNRLDataType in interface IVariabletype - the typepublic void setUserData(String key, Object data)
IVariablesetUserData in interface IVariablekey - the keydata - the dataCopyright © 2006-2013. All Rights Reserved.