getDeclaredMethods和getMethods的区别
getDeclaredMethods和getMethods的区别
区别
getDeclaredMethod:获取当前类的所有声明方法,包含public、protected和private修饰的方法。(从父类继承的不算)
getMethod:获取当前类和父类的所有public修饰的方法。(包括自身的所有public方法,和从基类继承的、从接口实现的所有public方法)
getDeclaredMethods和getMethods的区别
https://shikai.info/archives/getdeclaredmethodshe-getmethodsde-diff