Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8D16DD22A for ; Wed, 13 Mar 2013 15:56:13 +0000 (UTC) Received: (qmail 16063 invoked by uid 500); 13 Mar 2013 15:56:13 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 15925 invoked by uid 500); 13 Mar 2013 15:56:13 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 15916 invoked by uid 99); 13 Mar 2013 15:56:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Mar 2013 15:56:13 +0000 Date: Wed, 13 Mar 2013 15:56:13 +0000 (UTC) From: "Gary Gregory (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (LANG-873) Add FieldUtils getAllFields() to return all the fields defined in the given class and super classes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LANG-873?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary Gregory updated LANG-873: ------------------------------ Summary: Add FieldUtils getAllFields() to return all the fields defined in the given class and super classes (was: Add FieldUtils getDeclaredFields() to return all the fields defined in the given class and super classes) > 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