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


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to