getFields:獲取所有公共的public修飾的方法,包括父類的方法
getDeclaredFields:獲取所有本類聲明的方法,包括private修飾的,但是不包含父類的方法。
類似的還有 getMethods 與 getDecalredMethods, getConstructors()和getDeclaredConstructors();
getFields:獲取所有公共的public修飾的方法,包括父類的方法
getDeclaredFields:獲取所有本類聲明的方法,包括private修飾的,但是不包含父類的方法。
類似的還有 getMethods 與 getDecalredMethods, getConstructors()和getDeclaredConstructors();
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。