Esempio n. 1
0
 public Method getReflectMethod(String method, Class... types) {
   assertNotNull("dynamicCompiler not ready", dynamicCompiler);
   try {
     return dynamicCompiler.getMethod(method, types);
   } catch (Exception e) {
     e.printStackTrace();
     fail(e.getMessage());
   }
   return null;
 }
Esempio n. 2
0
 void compile(ClassNode cls) {
   if (!compile) {
     return;
   }
   try {
     dynamicCompiler = new DynamicCompiler(cls);
     boolean result = dynamicCompiler.compile();
     assertTrue("Compilation failed", result);
     System.out.println("Compilation: PASSED");
   } catch (Exception e) {
     e.printStackTrace();
     fail(e.getMessage());
   }
 }
Esempio n. 3
0
 public Object invoke(Method mth, Object... args) throws Exception {
   assertNotNull("dynamicCompiler not ready", dynamicCompiler);
   assertNotNull("unknown method", mth);
   return dynamicCompiler.invoke(mth, args);
 }