package eo.ejb.wiki;

public class ReflectiveClass {
    private String targetClass;

    public ReflectiveClass(String targetClass) {
        this.targetClass = targetClass;
    }

    public Object loadByReflection() throws Exception {
        return Class.forName(targetClass).newInstance();
    }

    public void invokeMethod(Class<?> cls) throws Exception {
        java.lang.reflect.Method m = cls.getMethod("execute");
        m.invoke(null);
    }
}