Package dev.frostlake.executor.udf
Class JavaFunctionCompiler
java.lang.Object
dev.frostlake.executor.udf.JavaFunctionCompiler
Compiles and executes inline Java user-defined functions
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
JavaFunctionCompiler
public JavaFunctionCompiler()
-
-
Method Details
-
compile
Compiles Java source code and caches the resulting class- Parameters:
sourceCode- the Java source codeclassName- the fully qualified class name to compile- Returns:
- the compiled Class object
-
invokeMethod
Invokes a static method on a compiled class- Parameters:
clazz- the compiled classmethodName- the name of the static method to invokeargs- the arguments to pass to the method- Returns:
- the result of the method invocation
-