/** * Auto generated class. */ @BallerinaFunction( orgName = "ballerina", packageName = "llvm", functionName = "LLVMGetLastEnumAttributeKind", returnType = { @ReturnType(type = INT, structPackage = "ballerina/llvm"), } ) public class LLVMGetLastEnumAttributeKind extends BlockingNativeCallableUnit { @Override public void execute(Context context) { int returnValue = LLVMGetLastEnumAttributeKind(); context.setReturnValues(new BInteger(returnValue)); } }
/** * Auto generated class. */ @BallerinaFunction( orgName = "ballerina", packageName = "llvm", functionName = "LLVMInitializeNativeTarget", returnType = { @ReturnType(type = INT, structPackage = "ballerina/llvm"), } ) public class LLVMInitializeNativeTarget extends BlockingNativeCallableUnit { @Override public void execute(Context context) { int returnValue = LLVMInitializeNativeTarget(); context.setReturnValues(new BInteger(returnValue)); } }
/** * Auto generated class. */ @BallerinaFunction( orgName = "ballerina", packageName = "llvm", functionName = "LLVMInitializeNativeDisassembler", returnType = { @ReturnType(type = INT, structPackage = "ballerina/llvm"), } ) public class LLVMInitializeNativeDisassembler extends BlockingNativeCallableUnit { @Override public void execute(Context context) { int returnValue = LLVMInitializeNativeDisassembler(); context.setReturnValues(new BInteger(returnValue)); } }
/** * Auto generated class. */ @BallerinaFunction( orgName = "ballerina", packageName = "llvm", functionName = "LLVMIsMultithreaded", returnType = { @ReturnType(type = INT, structPackage = "ballerina/llvm"), } ) public class LLVMIsMultithreaded extends BlockingNativeCallableUnit { @Override public void execute(Context context) { int returnValue = LLVMIsMultithreaded(); context.setReturnValues(new BInteger(returnValue)); } }
/** * Extern function ballerina.math:random. * * @since 0.90 */ @BallerinaFunction( orgName = "ballerina", packageName = "math", functionName = "random", returnType = {@ReturnType(type = TypeKind.FLOAT)}, isPublic = true ) public class Random extends BlockingNativeCallableUnit { public void execute(Context ctx) { ctx.setReturnValues(new BFloat(Math.random())); } }
/** * Extern function ballerina.system:getCurrentDirectory. * * @since 0.94.1 */ @BallerinaFunction( orgName = "ballerina", packageName = "system", functionName = "getCurrentDirectory", returnType = {@ReturnType(type = TypeKind.STRING)}, isPublic = true ) public class GetCurrentDirectory extends BlockingNativeCallableUnit { private static final String PROPERTY_NAME = "user.dir"; @Override public void execute(Context context) { context.setReturnValues(SystemUtils.getSystemProperty(PROPERTY_NAME)); } }
/** * Get the ID of the connection. * * @since 0.966 */ @BallerinaFunction( orgName = "ballerina", packageName = "http", functionName = "initEndpoint", receiver = @Receiver(type = TypeKind.OBJECT, structType = MOCK_LISTENER_ENDPOINT, structPackage = "ballerina.http"), returnType = {@ReturnType(type = TypeKind.OBJECT)}, isPublic = true ) public class NonListeningInitEndpoint extends org.ballerinalang.net.http.serviceendpoint.InitEndpoint { }
/** * Get the entity without the body of inbound response. * * @since 0.96 */ @BallerinaFunction( orgName = "ballerina", packageName = "http", functionName = "getEntityWithoutBody", receiver = @Receiver(type = TypeKind.OBJECT, structType = "Response", structPackage = "ballerina/http"), returnType = {@ReturnType(type = TypeKind.OBJECT)} ) public class GetEntityWithoutBody extends BlockingNativeCallableUnit { @Override public void execute(Context context) { context.setReturnValues(HttpUtil.getEntity(context, true, false)); } }
/** * Extern function future.isDone(). */ @BallerinaFunction( orgName = "ballerina", packageName = "builtin", functionName = "future.isDone", args = {@Argument(name = "f", type = TypeKind.FUTURE)}, returnType = {@ReturnType(type = TypeKind.BOOLEAN)}, isPublic = true ) public class IsDone extends BlockingNativeCallableUnit { @Override public void execute(Context context) { BFuture future = (BFuture) context.getRefArgument(0); context.setReturnValues(new BBoolean(future.isDone())); } }
/** * Extern function to get key arrays from the map. * ballerina.model.map:keys() */ @BallerinaFunction( orgName = "ballerina", packageName = "builtin", functionName = "map.keys", args = {@Argument(name = "m", type = TypeKind.MAP)}, returnType = {@ReturnType(type = TypeKind.ARRAY, elementType = TypeKind.STRING)}, isPublic = true ) public class GetKeys extends BlockingNativeCallableUnit { public void execute(Context ctx) { BMap<String, BValue> map = (BMap<String, BValue>) ctx.getRefArgument(0); BValueArray keyArray = new BValueArray(map.keys()); ctx.setReturnValues(keyArray); } }
/** * Extern function ballerina.math:ulp. * * @since 0.94 */ @BallerinaFunction( orgName = "ballerina", packageName = "math", functionName = "ulp", args = {@Argument(name = "val", type = TypeKind.FLOAT)}, returnType = {@ReturnType(type = TypeKind.FLOAT)}, isPublic = true ) public class Ulp extends BlockingNativeCallableUnit { public void execute(Context ctx) { double value = ctx.getFloatArgument(0); ctx.setReturnValues(new BFloat(Math.ulp(value))); } }
/** * Extern function ballerina.math:tan. * * @since 0.94 */ @BallerinaFunction( orgName = "ballerina", packageName = "math", functionName = "tan", args = {@Argument(name = "val", type = TypeKind.FLOAT)}, returnType = {@ReturnType(type = TypeKind.FLOAT)}, isPublic = true ) public class Tan extends BlockingNativeCallableUnit { public void execute(Context ctx) { double value = ctx.getFloatArgument(0); ctx.setReturnValues(new BFloat(Math.tan(value))); } }
/** * Extern function ballerina.math:log10. * * @since 0.94 */ @BallerinaFunction( orgName = "ballerina", packageName = "math", functionName = "log10", args = {@Argument(name = "val", type = TypeKind.FLOAT)}, returnType = {@ReturnType(type = TypeKind.FLOAT)}, isPublic = true ) public class Log10 extends BlockingNativeCallableUnit { public void execute(Context ctx) { double value = ctx.getFloatArgument(0); ctx.setReturnValues(new BFloat(Math.log10(value))); } }
/** * Extern function ballerina.math:cos. * * @since 0.94 */ @BallerinaFunction( orgName = "ballerina", packageName = "math", functionName = "cos", args = {@Argument(name = "val", type = TypeKind.FLOAT)}, returnType = {@ReturnType(type = TypeKind.FLOAT)}, isPublic = true ) public class Cos extends BlockingNativeCallableUnit { public void execute(Context ctx) { double value = ctx.getFloatArgument(0); ctx.setReturnValues(new BFloat(Math.cos(value))); } }
/** * Extern function ballerina.math:expm1. * * @since 0.94 */ @BallerinaFunction( orgName = "ballerina", packageName = "math", functionName = "expm1", args = {@Argument(name = "val", type = TypeKind.FLOAT)}, returnType = {@ReturnType(type = TypeKind.FLOAT)}, isPublic = true ) public class Expm1 extends BlockingNativeCallableUnit { public void execute(Context ctx) { double value = ctx.getFloatArgument(0); ctx.setReturnValues(new BFloat(Math.expm1(value))); } }
/** * Extern function ballerina.math:signum. * * @since 0.94 */ @BallerinaFunction( orgName = "ballerina", packageName = "math", functionName = "signum", args = {@Argument(name = "val", type = TypeKind.FLOAT)}, returnType = {@ReturnType(type = TypeKind.FLOAT)}, isPublic = true ) public class Signum extends BlockingNativeCallableUnit { public void execute(Context ctx) { double value = ctx.getFloatArgument(0); ctx.setReturnValues(new BFloat(Math.signum(value))); } }
/** * Extern function to get value array from the map. * ballerina.model.map:values() */ @BallerinaFunction( orgName = "ballerina", packageName = "builtin", functionName = "map.values", args = {@Argument(name = "m", type = TypeKind.MAP)}, returnType = {@ReturnType(type = TypeKind.ARRAY, elementType = TypeKind.ANY)}, isPublic = true ) public class GetValues extends BlockingNativeCallableUnit { public void execute(Context ctx) { BMap<String, BValue> map = (BMap<String, BValue>) ctx.getRefArgument(0); BValueArray bRefValueArray = new BValueArray((BRefType<?>[]) map.values(), BTypes.typeAny); ctx.setReturnValues(bRefValueArray); } }
/** * Extern function to get the current row of a table as a struct. * * @since 0.88 */ @BallerinaFunction( orgName = "ballerina", packageName = "builtin", functionName = "table.getNext", args = {@Argument(name = "dt", type = TypeKind.TABLE)}, returnType = {@ReturnType(type = TypeKind.ANY)}, isPublic = true ) public class GetNext extends BlockingNativeCallableUnit { public void execute(Context context) { BTable table = (BTable) context.getRefArgument(0); context.setReturnValues(table.getNext()); } }
/** * Get the 'Entity' of the inbound request with the body. * * @since 0.96.0 */ @BallerinaFunction(orgName = "ballerina", packageName = "http", functionName = "getEntity", receiver = @Receiver(type = TypeKind.OBJECT, structType = "Request", structPackage = "ballerina/http"), returnType = { @ReturnType(type = TypeKind.OBJECT) }, isPublic = true) public class GetEntity extends BlockingNativeCallableUnit { @Override public void execute(Context context) { context.setReturnValues(HttpUtil.getEntity(context, true, true)); } }
/** * Extern function ballerina.math:cbrt. * * @since 0.94 */ @BallerinaFunction( orgName = "ballerina", packageName = "math", functionName = "cbrt", args = {@Argument(name = "val", type = TypeKind.FLOAT)}, returnType = {@ReturnType(type = TypeKind.FLOAT)}, isPublic = true ) public class Cbrt extends BlockingNativeCallableUnit { public void execute(Context ctx) { double value = ctx.getFloatArgument(0); ctx.setReturnValues(new BFloat(Math.cbrt(value))); } }