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 VariableDef
public BType getType()
getType
in interface VariableDef
public void setType(BType type)
setType
in interface VariableDef
public VariableDef.Kind getKind()
getKind
in interface VariableDef
public void setKind(VariableDef.Kind kind)
setKind
in interface VariableDef
public int getVarIndex()
getVarIndex
in interface VariableDef
public void setVarIndex(int index)
setVarIndex
in interface VariableDef
public String getName()
getName
in interface BLangSymbol
public String getPackagePath()
getPackagePath
in interface BLangSymbol
public boolean isPublic()
isPublic
in interface BLangSymbol
public boolean isNative()
isNative
in interface BLangSymbol
public NodeLocation getNodeLocation()
Node
NodeLocation
includes the source filename and the line number.
getNodeLocation
in interface Node
public void setWhiteSpaceDescriptor(WhiteSpaceDescriptor whiteSpaceDescriptor)
public WhiteSpaceDescriptor getWhiteSpaceDescriptor()
Node
getWhiteSpaceDescriptor
in interface Node
Copyright © 2018 WSO2. All rights reserved.