public class BUnionType extends BType
BUnionType
represents a union type in Ballerina.pkgPath, typeName, valueClass
Constructor and Description |
---|
BUnionType()
Create a
BUnionType which represents the union type. |
BUnionType(List<BType> memberTypes)
Create a
BUnionType which represents the union type. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
<V extends BValue> |
getEmptyValue()
Get the empty initialized value of this type.
|
List<BType> |
getMemberTypes() |
TypeSignature |
getSig() |
int |
getTag() |
<V extends BValue> |
getZeroValue()
Get the default value of the type.
|
int |
hashCode() |
boolean |
isNullable() |
String |
toString() |
getName, getPackagePath, getValueClass, isNative, isPublic
public BUnionType()
BUnionType
which represents the union type.public boolean isNullable()
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()
Copyright © 2018 WSO2. All rights reserved.