@Test public void test_implicitClass_withArg_invoke() { Proc proc = Procs.invokeWith("count", 3); assertThat(proc.hasResult(), is(true)); assertThat(counter, is(3)); }
public static PN invokeWith(Class clazz, String name, Object... args) { Method m = Signatures.bestMethod(clazz, name, args); if (m == null) { throw notFound(clazz, name, args); } return new ReflectiveProc(null, m).call(args); }
ReflectiveProc extends PN { public static PN invokeWith(Class clazz, String name, Object... args) { Method m = Signatures.bestMethod(clazz, name, args); if (m == null) { throw notFound(clazz, name, args); } return new ReflectiveProc(null, m).call(args); } }
ReflectiveProc extends PN { public static PN invokeWith(Class clazz, String name, Object... args) { Method m = Signatures.bestMethod(clazz, name, args); if (m == null) { throw notFound(clazz, name, args); } return new ReflectiveProc(null, m).call(args); } ReflectiveProc(Object instance, Method method);  ReflectiveProc(Constructor constructor); }
ReflectiveProc extends PN { public static PN invokeWith(Class clazz, String name, Object... args) { Method m = Signatures.bestMethod(clazz, name, args); if (m == null) { throw notFound(clazz, name, args); } return new ReflectiveProc(null, m).call(args); } ReflectiveProc(Object instance, Method method);  ReflectiveProc(Constructor constructor); static Class[] anyParameters(int count); static ReflectiveProc newInstance(Class<?> clazz, Class... paramTypes); static PN newInstanceWith(Class<?> clazz, Object... args); static ReflectiveProc invoke(Class clazz, String name, Class... paramTypes); static ReflectiveProc invoke(Object object, String name, Class... paramTypes); static PN invokeWith(Class clazz, String name, Object... args); static PN invokeWith(Object object, String name, Object... args); }
ReflectiveProc extends PN { public static PN invokeWith(Class clazz, String name, Object... args) { Method m = Signatures.bestMethod(clazz, name, args); if (m == null) { throw notFound(clazz, name, args); } return new ReflectiveProc(null, m).call(args); } ReflectiveProc(Object instance, Method method);  ReflectiveProc(Constructor constructor); static Class[] anyParameters(int count); static ReflectiveProc newInstance(Class<?> clazz, Class... paramTypes); static PN newInstanceWith(Class<?> clazz, Object... args); static ReflectiveProc invoke(Class clazz, String name, Class... paramTypes); static ReflectiveProc invoke(Object object, String name, Class... paramTypes); static PN invokeWith(Class clazz, String name, Object... args); static PN invokeWith(Object object, String name, Object... args); static final Class[] ANY_PARAMETERS; static final Class[] NO_PARAMETERS; }