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




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to