摘要:
工作中用到反射,代码记录如下public String callXMLHandler(Object obj) throws IllegalArgumentException, IllegalAccessException{ Class clazz = (Class)obj.getClass(); Class clazzSuper = (Class) clazz.getSuperclass();//获得父类的Class Field field[] = clazz.getDeclaredFields();//getDeclaredFields 无法获得继承属性 //System.out... 阅读全文