public class BArrayType extends BType implements BIndexedType
BArrayType
represents a type of an arrays in Ballerina.
Arrays are defined using the arrays constructor [] as follows: TypeName[]
All arrays are unbounded in length and support 0 based indexing.
pkgPath, typeName, valueClass
Constructor and Description |
---|
BArrayType(BType elementType) |
BArrayType(BType elemType,
int size) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
getDimensions() |
BType |
getElementType()
Get the type of a child elements of this type.
|
<V extends BValue> |
getEmptyValue()
Get the empty initialized value of this type.
|
TypeSignature |
getSig() |
int |
getSize() |
BArrayState |
getState() |
int |
getTag() |
<V extends BValue> |
getZeroValue()
Get the default value of the type.
|
int |
hashCode() |
String |
toString() |
getName, getPackagePath, getValueClass, isNative, isPublic
public BArrayType(BType elementType)
public BArrayType(BType elemType, int size)
public BType getElementType()
BIndexedType
getElementType
in interface BIndexedType
public <V extends BValue> V getZeroValue()
BType
BType#getInitValue()
.getZeroValue
in class BType
V
- Type of the valuepublic <V extends BValue> V getEmptyValue()
BType
BType#getDefaultValue()
).getEmptyValue
in class BType
V
- Type of the valuepublic TypeSignature getSig()
public int getDimensions()
public int getSize()
public BArrayState getState()
Copyright © 2018 WSO2. All rights reserved.