从封装了的Class中可以获得String的method,以及field(成员变量)的信息!

解决方案 »

  1.   

    Returns the Class object associated with the class or interface with the given string name. Invoking this method is equivalent to:   
    Class.forName(className, true, currentLoader)  where currentLoader denotes the defining class loader of the current class. For example, the following code fragment returns the runtime Class descriptor for the class named java.lang.Thread:    Class t = Class.forName("java.lang.Thread")
      
    A call to forName("X") causes the class named X to be initialized
      

  2.   

    可以让你在程序中动态的加载一个Class