diff options
Diffstat (limited to 'tests/bugs153/pr155033/MultipleDumpTest.java')
-rw-r--r-- | tests/bugs153/pr155033/MultipleDumpTest.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/bugs153/pr155033/MultipleDumpTest.java b/tests/bugs153/pr155033/MultipleDumpTest.java new file mode 100644 index 000000000..554460bb1 --- /dev/null +++ b/tests/bugs153/pr155033/MultipleDumpTest.java @@ -0,0 +1,24 @@ +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +public class MultipleDumpTest { + + public static void main(String[] args) throws Exception { + System.out.println("? MultipleDumpTest.main()"); + invokeMain("Class1",args); + invokeMain("Class2",args); + invokeMain("Class3",args); + } + + private static void invokeMain (String className, String[] args) throws Exception + { + Class clazz = Class.forName(className); + Class[] paramTypes = new Class[1]; + paramTypes[0] = args.getClass(); + + Method method = clazz.getDeclaredMethod("main",paramTypes); + Object[] params = new Object[1]; + params[0] = args; + method.invoke(null,params); + } +}
\ No newline at end of file |