> Thanks, didn't know about TYPE either... My interest was that a Class
> actually exists to describe a native type int, even though native
> types are
> not Classes per se and can't be instantiated... (e.g., obviously, int i =
> new int(2); fails and actually thinks an int[] is attempting to be created
> from the error message).
>
If you look at reflection also the Type of a field which is a primitive is
also Integer, Double, Boolean, Char, etc. For example;
Field[] f = someInstance.getClass().getFields();
for (int i = 0; i < f.length; i++) {
Object o = f[i].get(someInstance);
/* do something here */
}
if 'someInstance' has fields int, char, boolean etc the Object that
Field.get(Object instance) will return is the wrapper class of the
primitive.
regs
scot.
____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm
Be respectful! Clean up your posts before replying
____________________________________________________