||Subverting Java Access Protection for Unit Testing|
|Subject:||reason for getDeclaredFields()|
I disagree with "The reason for the existence of two methods (instead of a single method that returns all fields, including inherited ones) seems to be so that simple dynamic lookup of public fields can be achieved easily (using getField() and getFields()) and generally does the right thing. If a program wants to see the private fields, it will probably want to handle inherited fields specially (for example, an object-oriented debugger)."
Hear us Roar