You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TestITDMethod.java 1017B

12345678910111213141516171819202122232425262728
  1. /*******************************************************************************
  2. * Copyright (c) 2005 Contributors.
  3. * All rights reserved.
  4. * This program and the accompanying materials are made available
  5. * under the terms of the Eclipse Public License v1.0
  6. * which accompanies this distribution and is available at
  7. * http://eclipse.org/legal/epl-v10.html
  8. *
  9. * Contributors:
  10. * Matthew Webster initial implementation
  11. *******************************************************************************/
  12. import java.lang.reflect.Method;
  13. import java.lang.reflect.Modifier;
  14. public class TestITDMethod {
  15. public void invokeDeclaredMethods (String[] names) throws Exception {
  16. for (int i = 0; i < names.length; i++) {
  17. Method method = getClass().getDeclaredMethod(names[i],new Class[] {});
  18. method.invoke(this,new Object[] {});
  19. }
  20. }
  21. public static void main (String[] args) throws Exception {
  22. System.out.println("TestITDMethod.main");
  23. new TestITDMethod().invokeDeclaredMethods(args);
  24. }
  25. }