package poi;import java.lang.reflect.Constructor;import java.lang.reflect.Field;import java.lang.reflect.Method;import java.lang.reflect.Modifier;import org.apache.poi.xwpf.usermodel.XWPFSettings;public class ReflectMain { public static void main(String[] arg) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalaccessException, ClassNotFoundException, InstantiationException{ XWPFSettings ct = new XWPFSettings(); //反射三種方法 Class c = ct.getClass(); //Class c = XWPFSettings.class; //Class c = Class.forName("XWPFSettings"); System.out.
新聞熱點
疑難解答