commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-873) Add FieldUtils getAllFields() to return all the fields defined in the given class and super classes
Date Thu, 14 Mar 2013 01:39:11 GMT

    [ https://issues.apache.org/jira/browse/LANG-873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13601942#comment-13601942
] 

Gary Gregory commented on LANG-873:
-----------------------------------

All, please see:

{noformat}
commit -m "[LANG-873] Add FieldUtils getAllFields() to return all the fields defined in the
given class and super classes. Alternate impl that splits into two APIs, one with an array
result, the other with a List." C:/svn/org/apache/commons/trunks-proper/lang/src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java
    Sending        C:/svn/org/apache/commons/trunks-proper/lang/src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java
    Transmitting file data ...
    Committed revision 1456304.
commit -m "[LANG-873] Add FieldUtils getAllFields() to return all the fields defined in the
given class and super classes. Alternate impl that splits into two APIs, one with an array
result, the other with a List." C:/svn/org/apache/commons/trunks-proper/lang/src/test/java/org/apache/commons/lang3/reflect/FieldUtilsTest.java
    Sending        C:/svn/org/apache/commons/trunks-proper/lang/src/test/java/org/apache/commons/lang3/reflect/FieldUtilsTest.java
    Transmitting file data ...
    Committed revision 1456305.
{noformat}


                
> Add FieldUtils getAllFields() to return all the fields defined in the given class and
super classes
> ---------------------------------------------------------------------------------------------------
>
>                 Key: LANG-873
>                 URL: https://issues.apache.org/jira/browse/LANG-873
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.reflect.*
>            Reporter: Emmanuel Bourg
>            Priority: Minor
>             Fix For: 3.2
>
>         Attachments: FieldUtils.diff, FieldUtils.diff, FieldUtilsTest.diff
>
>
> {{java.lang.Class.getDeclaredFields()}} doesn't return the fields defined by the super
classes. I'd like to suggest the addition of a new method in FieldUtils that also returns
the inherited fields (including the private fields).
> According to this question on StackOverflow this method would be quite useful:
> http://stackoverflow.com/questions/3567372/access-to-private-inherited-fields-via-reflection-in-java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message