Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 83442 invoked from network); 2 Nov 2006 14:10:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Nov 2006 14:10:22 -0000 Received: (qmail 46897 invoked by uid 500); 2 Nov 2006 14:10:18 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 46879 invoked by uid 500); 2 Nov 2006 14:10:18 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 46868 invoked by uid 99); 2 Nov 2006 14:10:18 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Nov 2006 06:10:18 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [63.240.77.85] (HELO sccrmhc15.comcast.net) (63.240.77.85) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Nov 2006 06:10:02 -0800 Received: from [192.168.1.47] (c-69-143-26-154.hsd1.va.comcast.net[69.143.26.154]) by comcast.net (sccrmhc15) with ESMTP id <2006110214094101500t6it0e>; Thu, 2 Nov 2006 14:09:41 +0000 Message-ID: <4549FC1D.8030708@christopherschultz.net> Date: Thu, 02 Nov 2006 09:09:33 -0500 From: Christopher Schultz User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: How to get fields list in order References: <4549F3E9.6010804@verizon.net> In-Reply-To: <4549F3E9.6010804@verizon.net> X-Enigmail-Version: 0.94.0.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigD418397D69665F1AAAA5E01E" X-Virus-Checked: Checked by ClamAV on apache.org --------------enigD418397D69665F1AAAA5E01E Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable David, > How can I get a list of the public fields declared in a class, *in the > order they are declared*? Using Reflection's getFields and > getDeclaredFields methods returns them in no particular order, and I > need them in the order they are declared so I can get their starting > byte offsets. Since you mentioned byte offsets, I have to ask: are you trying to subvert the serialization system? Or, even worse, inspect the object memory from with JNI? I would guess that if you can't get the proper order of the fields from Class.getDeclaredFields, then you can't get it at all. -chris --------------enigD418397D69665F1AAAA5E01E Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFSfwi9CaO5/Lv0PARAnkcAJ9md5sYhcSD9hTO1NMVs+qZJt57RwCglz1J 6gOFZ02by4HL5rogIPQZGzQ= =VqcR -----END PGP SIGNATURE----- --------------enigD418397D69665F1AAAA5E01E--