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 BLangSymbolpublic String getPackagePath()
getPackagePath in interface BLangSymbolpublic boolean isPublic()
isPublic in interface BLangSymbolpublic boolean isNative()
isNative in interface BLangSymbolCopyright © 2018 WSO2. All rights reserved.