public class StructImpl extends AnnotatableNode implements Struct
StructannotationMap| Modifier and Type | Method and Description |
|---|---|
void |
addNativeData(String key,
Object data)
Add native data to the struct.
|
String |
getAnnotationEntryKey() |
List<Annotation> |
getAnnotationList(String pkgPath,
String name)
This method will return the list of annotations for the given package path and annotation name.
|
Value[] |
getArrayField(String fieldName)
Returns value of an array field.
|
boolean |
getBooleanField(String fieldName)
Returns value of a boolean field.
|
String |
getEnumField(String fieldName)
Returns value of an enum field.
|
org.ballerinalang.connector.impl.StructImpl.StructFieldImpl[] |
getFields()
Returns all the struct fields.
|
double |
getFloatField(String fieldName)
Returns value of a float field.
|
long |
getIntField(String fieldName)
Returns value of an int field.
|
Map<String,Value> |
getMapField(String fieldName)
Returns value of a map field.
|
String |
getName()
Returns the struct name.
|
Object |
getNativeData(String key)
Get native data.
|
String |
getPackage()
Returns the package of the struct.
|
Value |
getRefField(String fieldName)
Returns value of an Ref field.
|
String |
getStringField(String fieldName)
Returns value of a string field.
|
Struct |
getStructField(String fieldName)
Returns value of a struct field.
|
Value |
getTypeField(String fieldName)
Returns value of an Type field.
|
BValue |
getVMValue()
returns VM value.
|
addAnnotationpublic String getPackage()
StructgetPackage in interface Structpublic org.ballerinalang.connector.impl.StructImpl.StructFieldImpl[] getFields()
Structpublic long getIntField(String fieldName)
StructgetIntField in interface StructfieldName - given field namepublic double getFloatField(String fieldName)
StructgetFloatField in interface StructfieldName - given field namepublic String getStringField(String fieldName)
StructgetStringField in interface StructfieldName - given field namepublic boolean getBooleanField(String fieldName)
StructgetBooleanField in interface StructfieldName - given field namepublic Struct getStructField(String fieldName)
StructgetStructField in interface StructfieldName - given field namepublic Value[] getArrayField(String fieldName)
StructgetArrayField in interface StructfieldName - given field namepublic BValue getVMValue()
StructgetVMValue in interface Structpublic Map<String,Value> getMapField(String fieldName)
StructgetMapField in interface StructfieldName - given field namepublic String getEnumField(String fieldName)
StructgetEnumField in interface StructfieldName - given field namepublic Value getTypeField(String fieldName)
StructgetTypeField in interface StructfieldName - given field namepublic Value getRefField(String fieldName)
StructgetRefField in interface StructfieldName - given field namepublic List<Annotation> getAnnotationList(String pkgPath, String name)
StructgetAnnotationList in interface StructpkgPath - of the annotation.name - of the annotation.public void addNativeData(String key, Object data)
StructaddNativeData in interface Structkey - key to identify native value.data - value to be added.public Object getNativeData(String key)
StructgetNativeData in interface Structkey - key to identify native value.public String getAnnotationEntryKey()
getAnnotationEntryKey in class AnnotatableNodeCopyright © 2018 WSO2. All rights reserved.