public class Compiler
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
Compiler.ClassbyteClassLoader
this is a classloader used to define classes from bytecode
|
Modifier and Type | Field and Description |
---|---|
private static int |
nextId |
Constructor and Description |
---|
Compiler() |
Modifier and Type | Method and Description |
---|---|
private static byte[] |
compileBytes(Rule rule,
java.lang.Class helperClass,
java.lang.String helperName,
java.lang.String compiledHelperName,
boolean compileToBytecode) |
static java.lang.Class |
getHelperAdapter(Rule rule,
java.lang.Class helperClass,
boolean compileToBytecode) |
static java.lang.Class<?> |
loadHelperAdapter(java.lang.ClassLoader triggerClassLoader,
java.lang.String helperAdapterName,
byte[] classBytes)
dynamically load and return a generated helper adapter classes using a custom classloader derived from the
trigger class's loader
|
private static int |
nextId() |
public static java.lang.Class getHelperAdapter(Rule rule, java.lang.Class helperClass, boolean compileToBytecode) throws CompileException
CompileException
private static byte[] compileBytes(Rule rule, java.lang.Class helperClass, java.lang.String helperName, java.lang.String compiledHelperName, boolean compileToBytecode) throws java.lang.Exception
java.lang.Exception
private static int nextId()
public static java.lang.Class<?> loadHelperAdapter(java.lang.ClassLoader triggerClassLoader, java.lang.String helperAdapterName, byte[] classBytes)
triggerClassLoader
- the class loader of the trigger class which has been matched with this
helper class's rulehelperAdapterName
- the name of the helper adaptter class to be loadedclassBytes
- the byte array defining the class