public class SimpleVariableDef extends Object implements VariableDef
VariableDef represent a Variable definition.
Ballerina has variables of various types. The type system includes built-in primitives, a collection of built-in structured types and arrays and record type constructors.
VariableDef.Kind| Modifier and Type | Field and Description |
|---|---|
protected Identifier |
identifier |
protected boolean |
isNative |
protected boolean |
isPublic |
protected VariableDef.Kind |
kind |
protected NodeLocation |
location |
protected int |
memOffset |
protected String |
pkgPath |
protected BType |
type |
protected SimpleTypeName |
typeName |
protected WhiteSpaceDescriptor |
whiteSpaceDescriptor |
| Constructor and Description |
|---|
SimpleVariableDef() |
| Modifier and Type | Method and Description |
|---|---|
VariableDef.Kind |
getKind() |
String |
getName() |
NodeLocation |
getNodeLocation()
Returns the location of this node.
|
String |
getPackagePath() |
BType |
getType() |
SimpleTypeName |
getTypeName() |
int |
getVarIndex() |
WhiteSpaceDescriptor |
getWhiteSpaceDescriptor()
Get information about whitespace associated with this particular node in source file.
|
boolean |
isNative() |
boolean |
isPublic() |
void |
setKind(VariableDef.Kind kind) |
void |
setType(BType type) |
void |
setVarIndex(int index) |
void |
setWhiteSpaceDescriptor(WhiteSpaceDescriptor whiteSpaceDescriptor) |
protected NodeLocation location
protected WhiteSpaceDescriptor whiteSpaceDescriptor
protected SimpleTypeName typeName
protected BType type
protected VariableDef.Kind kind
protected int memOffset
protected Identifier identifier
protected String pkgPath
protected boolean isPublic
protected boolean isNative
public SimpleTypeName getTypeName()
getTypeName in interface VariableDefpublic BType getType()
getType in interface VariableDefpublic void setType(BType type)
setType in interface VariableDefpublic VariableDef.Kind getKind()
getKind in interface VariableDefpublic void setKind(VariableDef.Kind kind)
setKind in interface VariableDefpublic int getVarIndex()
getVarIndex in interface VariableDefpublic void setVarIndex(int index)
setVarIndex in interface VariableDefpublic String getName()
getName in interface BLangSymbolpublic String getPackagePath()
getPackagePath in interface BLangSymbolpublic boolean isPublic()
isPublic in interface BLangSymbolpublic boolean isNative()
isNative in interface BLangSymbolpublic 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 NodeCopyright © 2018 WSO2. All rights reserved.