Re: what does [Ljava.lang.String; mean in 5.0jdk
"Dave Brosius" <[email protected]>
| Newsgroups | gmane.comp.jakarta.bcel.user |
|---|---|
| Message-ID | <011301c4fc63$252af2b0$af7596d1@MBFG> |
There is no straightforward representation of a class that is an array. (for instance java doesn't use java.lang.String[] in the class file) So when an array needs to be referenced, it represented by the 'signature' version of the class name. The [ bracket means it's an array, the LXXX; means it's an object reference of type XXX. ----- Original Message ----- From: "Dean Hiller" <[email protected]> To: "BCEL Users List" <[email protected]> Sent: Sunday, January 16, 2005 5:09 PM Subject: what does [Ljava.lang.String; mean in 5.0jdk I checked out source from bcel head, and compiled it. When I tried my stuff out on jdk5.0, the following code starts failing(when processing the ConstantPool) case Constants.CONSTANT_Class: int ind = ((ConstantClass)c).getNameIndex(); c = pool.getConstant(ind, Constants.CONSTANT_Utf8); String className = Utility.compactClassName(((ConstantUtf8)c).getBytes(), false); log(" className="+className, Project.MSG_VERBOSE); design.checkClass(className); Notice the className is [Ljava.lang.String; in my logs which is unusual as this works fine in 1.4 where the classNames are java.lang.String etc. How do I make it so I get the real className? instead of [Ljava.lang.String; thanks, dean