United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6841420 classfile: add new methods to ConstantClassInfo
JDK-6841420 : classfile: add new methods to ConstantClassInfo

Details
Type:
Enhancement
Submit Date:
2009-05-15
Status:
Closed
Updated Date:
2012-01-13
Project Name:
JDK
Resolved Date:
2012-01-13
Component:
tools
OS:
generic
Sub-Component:
javap
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports

Sub Tasks

Description
From Kevin Looney:


    I've come across a case where I think it makes sense to consider additional parsing to ConstantClassInfo (in Constants.java)

     The problem is this:

            ConstantRefs in the constant pool contain an encoded string, we refer to as the name.   ConstantRefs in the VM spec describe two flavors:
              A class name (encoded in typical VM format, ie L/com/sun/Foo;)
              An array of classes (encoded in VM format, ie [L/com/sun/Foo;)

The problem is for dependency analysis, we need to know if the Ref is an array, and strip out all of the array delimiters.

[[Kevin proposes to add]] a few simple methods to ConstantClassInfo:

isArray()
getArrayClassName();

which do this.

                                    

Comments
EVALUATION

Yes.
                                     
2009-05-15



Hardware and Software, Engineered to Work Together