1 15 package org.apache.examples.panorama.startup.impl; 16 17 import java.lang.reflect.Method ; 18 19 import org.apache.examples.panorama.startup.Executable; 20 21 28 public class ExecuteStatic implements Executable 29 { 30 private String _methodName = "init"; 31 private Class _targetClass; 32 33 public void execute() throws Exception 34 { 35 Method m = _targetClass.getMethod(_methodName, (Class []) null); 36 37 m.invoke(null, (Object []) null); 38 } 39 40 45 public void setMethodName(String string) 46 { 47 _methodName = string; 48 } 49 50 53 public void setTargetClass(Class targetClass) 54 { 55 _targetClass = targetClass; 56 } 57 58 } 59 | Popular Tags |