1.1 --- a/src/share/classes/com/sun/tools/classfile/ConstantPool.java Tue May 19 11:27:10 2009 -0700 1.2 +++ b/src/share/classes/com/sun/tools/classfile/ConstantPool.java Tue May 19 11:33:13 2009 -0700 1.3 @@ -310,6 +310,20 @@ 1.4 return cp.getUTF8Value(name_index); 1.5 } 1.6 1.7 + public String getBaseName() throws ConstantPoolException { 1.8 + String name = getName(); 1.9 + int index = name.indexOf("[L") + 1; 1.10 + return name.substring(index); 1.11 + } 1.12 + 1.13 + public int getDimensionCount() throws ConstantPoolException { 1.14 + String name = getName(); 1.15 + int count = 0; 1.16 + while (name.charAt(count) == '[') 1.17 + count++; 1.18 + return count; 1.19 + } 1.20 + 1.21 @Override 1.22 public String toString() { 1.23 return "CONSTANT_Class_info[name_index: " + name_index + "]";