getFields()和getDeclaredFields()

getFields()获得某个类的所有的公共(public)的字段,包括父类。 

getDeclaredFields()获得某个类的所有申明的字段,即包括public、private和proteced,

但是不包括父类的申明字段。 

同样类似的还有getConstructors()和getDeclaredConstructors(),
getMethods()和getDeclaredMethods()。

转自:http://blog.163.com/hanyinlong@126/blog/static/9975148620111013101452210/

原文地址:https://www.cnblogs.com/tv151579/p/3293329.html