Search in sources :

Example 1 with LockableStructureType

use of org.ballerinalang.model.values.LockableStructureType in project ballerina by ballerina-lang.

the class ConnectorSPIModelHelper method getAnnotationVariable.

public static BMap getAnnotationVariable(String pkgPath, ProgramFile programFile) {
    PackageInfo packageInfo = programFile.getPackageInfo(pkgPath);
    PackageVarInfo annotationData = packageInfo.getPackageVarInfo(ANNOTATION_DATA);
    final LockableStructureType globalMemoryBlock = programFile.getGlobalMemoryBlock();
    return (BMap) globalMemoryBlock.getRefField(annotationData.getGlobalMemIndex());
}
Also used : BMap(org.ballerinalang.model.values.BMap) PackageInfo(org.ballerinalang.util.codegen.PackageInfo) PackageVarInfo(org.ballerinalang.util.codegen.PackageVarInfo) LockableStructureType(org.ballerinalang.model.values.LockableStructureType)

Aggregations

BMap (org.ballerinalang.model.values.BMap)1 LockableStructureType (org.ballerinalang.model.values.LockableStructureType)1 PackageInfo (org.ballerinalang.util.codegen.PackageInfo)1 PackageVarInfo (org.ballerinalang.util.codegen.PackageVarInfo)1