|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IVariable
A variable reference. A variable is bound either directly to an element, or to a complex expression.
Method Summary | |
---|---|
IModelElement |
getBoundElement()
Return the model element bound to this variable. |
IExpression |
getBoundExpression()
Return the complex expression bound to this variable. |
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 |
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. |
Method Detail |
---|
IModelElement getBoundElement()
isBoundToElement()
returns false for this variable, then this
method will return null
.
IExpression getBoundExpression()
isBoundToElement()
returns true for this variable, then this
will return null, else it returns the expression.
String getName()
NRLDataType getNRLDataType()
NRLDataType
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.
Object getUserData(String key)
key
- the key identifying the data
boolean isBoundToElement()
void setNRLDataType(NRLDataType type)
type
- the typevoid setUserData(String key, Object data)
key
- the keydata
- the data
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |