public final class CompileUtils extends Object
Constructor and Description |
---|
CompileUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
cleanUp()
Triggers internal garbage collection of expired cache entries.
|
static <T> Class<T> |
compile(ClassLoader cl,
String name,
String code)
Compiles a generated code to a Class.
|
static org.codehaus.janino.ExpressionEvaluator |
compileExpression(String code,
List<String> argumentNames,
List<Class<?>> argumentClasses,
Class<?> returnClass)
Compiles an expression code to a janino
ExpressionEvaluator . |
public static void cleanUp()
public static <T> Class<T> compile(ClassLoader cl, String name, String code)
T
- the class typecl
- the ClassLoader used to load the classname
- the class namecode
- the generated codepublic static org.codehaus.janino.ExpressionEvaluator compileExpression(String code, List<String> argumentNames, List<Class<?>> argumentClasses, Class<?> returnClass)
ExpressionEvaluator
.code
- the expression codeargumentNames
- the expression argument namesargumentClasses
- the expression argument classesreturnClass
- the return type of the expressionCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.