public final class CompileUtils extends Object
Modifier and Type | Field and Description |
---|---|
protected static org.apache.flink.shaded.guava18.com.google.common.cache.Cache<String,org.apache.flink.shaded.guava18.com.google.common.cache.Cache<ClassLoader,Class>> |
COMPILED_CACHE
Cache of compile, Janino generates a new Class Loader and a new Class file every compile
(guaranteeing that the class name will not be repeated).
|
Constructor and Description |
---|
CompileUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> Class<T> |
compile(ClassLoader cl,
String name,
String code)
Compiles a generated code to a Class.
|
protected static final org.apache.flink.shaded.guava18.com.google.common.cache.Cache<String,org.apache.flink.shaded.guava18.com.google.common.cache.Cache<ClassLoader,Class>> COMPILED_CACHE
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 codeCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.