public abstract class AbstractExpression extends Object implements Expression
AbstractExpression
Provides the common behaviour of expressions.
| Modifier and Type | Field and Description |
|---|---|
protected NodeLocation |
location |
protected boolean |
multipleReturnsAvailable |
protected int |
offset |
protected int |
tempOffset |
protected BType |
type |
protected WhiteSpaceDescriptor |
whiteSpaceDescriptor |
| Constructor and Description |
|---|
AbstractExpression(NodeLocation location,
WhiteSpaceDescriptor whiteSpaceDescriptor) |
| Modifier and Type | Method and Description |
|---|---|
NodeLocation |
getNodeLocation()
Returns the location of this node.
|
int |
getTempOffset()
Get Temporary Location of the stack frame of the expression.
|
BType |
getType() |
WhiteSpaceDescriptor |
getWhiteSpaceDescriptor()
Get information about whitespace associated with this particular node in source file.
|
boolean |
hasTemporaryValues() |
boolean |
isMultiReturnExpr() |
void |
setMultiReturnAvailable(boolean multiReturnsAvailable) |
void |
setOffset(int offset) |
void |
setTempOffset(int index)
Set Temporary Location in stack frame for storing expression result.
|
void |
setType(BType type) |
void |
setWhiteSpaceDescriptor(WhiteSpaceDescriptor whiteSpaceDescriptor) |
protected NodeLocation location
protected WhiteSpaceDescriptor whiteSpaceDescriptor
protected BType type
protected boolean multipleReturnsAvailable
protected int offset
protected int tempOffset
public AbstractExpression(NodeLocation location, WhiteSpaceDescriptor whiteSpaceDescriptor)
public BType getType()
getType in interface Expressionpublic void setType(BType type)
setType in interface Expressionpublic void setOffset(int offset)
setOffset in interface Expressionpublic boolean isMultiReturnExpr()
isMultiReturnExpr in interface Expressionpublic void setMultiReturnAvailable(boolean multiReturnsAvailable)
public NodeLocation getNodeLocation()
Node
NodeLocation includes the source filename and the line number.
getNodeLocation in interface Nodepublic void setWhiteSpaceDescriptor(WhiteSpaceDescriptor whiteSpaceDescriptor)
public WhiteSpaceDescriptor getWhiteSpaceDescriptor()
NodegetWhiteSpaceDescriptor in interface Nodepublic int getTempOffset()
ExpressiongetTempOffset in interface Expressionpublic void setTempOffset(int index)
ExpressionsetTempOffset in interface Expressionindex - calculated temporary offset.public boolean hasTemporaryValues()
hasTemporaryValues in interface ExpressionCopyright © 2018 WSO2. All rights reserved.