public abstract class BType extends Object implements BLangSymbol
BType
represents a type in Ballerina.
Ballerina has variables of various types. The type system includes built-in primitive or value types, a collection of built-in structured types, and arrays, record and iterator type constructors. All variables of primitive types are allocated on the stack while all non-primitive types are allocated on a heap using new.
Modifier and Type | Field and Description |
---|---|
protected String |
pkgPath |
protected String |
typeName |
protected Class<? extends BValue> |
valueClass |
Modifier | Constructor and Description |
---|---|
protected |
BType(String typeName,
String pkgPath,
Class<? extends BValue> valueClass) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
abstract <V extends BValue> |
getEmptyValue()
Get the empty initialized value of this type.
|
String |
getName() |
String |
getPackagePath() |
abstract TypeSignature |
getSig() |
abstract int |
getTag() |
<V extends BValue> |
getValueClass() |
abstract <V extends BValue> |
getZeroValue()
Get the default value of the type.
|
int |
hashCode() |
boolean |
isNative() |
boolean |
isPublic() |
String |
toString() |
public abstract <V extends BValue> V getZeroValue()
BType#getInitValue()
.V
- Type of the valuepublic abstract <V extends BValue> V getEmptyValue()
BType#getDefaultValue()
).V
- Type of the valuepublic abstract TypeSignature getSig()
public abstract int getTag()
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
Copyright © 2018 WSO2. All rights reserved.