public static InvokerFunction getInvokerFunction(String name, byte[] buf) { try { return new ByteClassLoader(buf).findClass(name).newInstance(); } catch (InstantiationException e) { throw new RuntimeException(e); } catch (IllegalAccessException e) { throw new RuntimeException(e); } } }
public Class<InvokerFunction> findClass(String name) { return (Class<InvokerFunction>)defineClass(name, buf, 0, buf.length); }
private InvokerFunction generateInvokerFunction(String className, Method method, boolean isStatic, Class<?>[] arguments) { byte[] byteCode = generateInvokerFunctionBytecode(className, method, isStatic, arguments); return ByteClassLoader.getInvokerFunction(className, byteCode); }