[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Patrick Doyle
Subject: Class.getComponentType
Date: Sun, 19 Aug 2001 23:01:52 -0400 (EDT)

The code provided for java.lang.Class.getComponentType doesn't work for
arrays of primitives.  Simply stripping off one bracket doesn't work,
because for instance "[[I" becomes "[I" and then finally "I", which is not
the name of int's type.  (In fact, I don't think it works for
non-primitives either, because arrays of class instances still have the
class name in "L%s;" format.)

Sorry I don't have a patch for you, but I implemented mine natively, so it
wouldn't be much use anyway.

Patrick Doyle

reply via email to

[Prev in Thread] Current Thread [Next in Thread]