G
grz01
Hi,
Working, with Reflection, I find the methods
Class.getFields():
=> returns "all the accessible public fields of the class"
and
Class.getDeclaredFields():
=> returns "all the fields declared by the class or interface
represented by this Class object. This includes public, protected,
default (package) access, and private fields, but *excludes inherited
fields*."
But if I want to *include inherited fields*, that are protected but
not public, I cannot find a method for that?
Do I need to recursively analyse all the superclasses, or is there
some other method that I am missing?
TIA / grz01
Working, with Reflection, I find the methods
Class.getFields():
=> returns "all the accessible public fields of the class"
and
Class.getDeclaredFields():
=> returns "all the fields declared by the class or interface
represented by this Class object. This includes public, protected,
default (package) access, and private fields, but *excludes inherited
fields*."
But if I want to *include inherited fields*, that are protected but
not public, I cannot find a method for that?
Do I need to recursively analyse all the superclasses, or is there
some other method that I am missing?
TIA / grz01