Exemplo n.º 1
0
 public static Object invokeReplay(Method method, Object obj, Object... args)
     throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
   if (NonDeterministicLoggingMethodVisitor.isND(
       method.getDeclaringClass().getName().replace(".", "/"),
       method.getName(),
       Type.getMethodDescriptor(method))) {
     if (args != null)
       for (int i = 0; i < args.length; i++) {
         if (args[i] != null && args[i].getClass().isArray()) args[i] = replay();
       }
     Object ret = replay();
     return ret;
   } else return method.invoke(obj, args);
 }
Exemplo n.º 2
0
 public static Object invoke(Method method, Object obj, Object... args)
     throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
   if (NonDeterministicLoggingMethodVisitor.isND(
       method.getDeclaringClass().getName().replace(".", "/"),
       method.getName(),
       Type.getMethodDescriptor(method))) {
     Object ret = method.invoke(obj, args);
     if (args != null)
       for (Object arg : args) {
         if (arg != null && arg.getClass().isArray()) log(arg);
       }
     log(ret);
     return ret;
   } else return method.invoke(obj, args);
 }