public class BStructType extends BType
BStructType represents a user defined StructDef in Ballerina.| Modifier and Type | Class and Description |
|---|---|
static class |
BStructType.AttachedFunction
This class represents an attached function of a struct.
|
static class |
BStructType.StructField
This class represents struct field.
|
| Modifier and Type | Field and Description |
|---|---|
BStructType.AttachedFunction |
defaultsValuesInitFunc |
int |
flags |
BStructType.AttachedFunction |
initializer |
StructInfo |
structInfo |
pkgPath, typeName, valueClass| Constructor and Description |
|---|
BStructType(StructInfo structInfo,
String typeName,
String pkgPath,
int flags)
Create a
BStructType which represents the user defined struct type. |
| Modifier and Type | Method and Description |
|---|---|
BStructType.AttachedFunction[] |
getAttachedFunctions() |
<V extends BValue> |
getEmptyValue()
Get the empty initialized value of this type.
|
int[] |
getFieldTypeCount() |
TypeSignature |
getSig() |
BStructType.StructField[] |
getStructFields() |
int |
getTag() |
<V extends BValue> |
getZeroValue()
Get the default value of the type.
|
void |
setAttachedFunctions(BStructType.AttachedFunction[] attachedFunctions) |
void |
setFieldTypeCount(int[] fieldCount) |
void |
setStructFields(BStructType.StructField[] structFields) |
equals, getName, getPackagePath, getValueClass, hashCode, isNative, isPublic, toStringpublic StructInfo structInfo
public BStructType.AttachedFunction initializer
public BStructType.AttachedFunction defaultsValuesInitFunc
public int flags
public BStructType(StructInfo structInfo, String typeName, String pkgPath, int flags)
BStructType which represents the user defined struct type.typeName - string name of the typepkgPath - package of the structpublic BStructType.StructField[] getStructFields()
public void setStructFields(BStructType.StructField[] structFields)
public BStructType.AttachedFunction[] getAttachedFunctions()
public void setAttachedFunctions(BStructType.AttachedFunction[] attachedFunctions)
public int[] getFieldTypeCount()
public void setFieldTypeCount(int[] fieldCount)
public <V extends BValue> V getZeroValue()
BTypeBType#getInitValue().getZeroValue in class BTypeV - Type of the valuepublic <V extends BValue> V getEmptyValue()
BTypeBType#getDefaultValue()).getEmptyValue in class BTypeV - Type of the valuepublic TypeSignature getSig()
Copyright © 2018 WSO2. All rights reserved.