InnerClassesAttributepublic class InnerClassesAttribute extends Attribute Encapsulates the InnerClasses attribute of a Java class file.
This class has never been thoroughly tested. |
Fields Summary |
---|
private int | attributeNameIndexindex into the constant pool table containing the name
of this class | private int | attributeLengthlength of this attribute in bytes | private int | numberOfClassesthe number of classes represented by this inner classes attribute | private InnerClassesTable[] | classesan array that holds the inner classes represented by this attribute |
Constructors Summary |
---|
public InnerClassesAttribute(DataInputStream iStream, int attributeNameIndex, int attributeLength)Constructor. Reads the InnerClassesAttribute attribute from
the class file.
this.attributeNameIndex = attributeNameIndex;
this.attributeLength = attributeLength;
numberOfClasses = iStream.readUnsignedShort ();
classes = new InnerClassesTable[numberOfClasses];
for (int lcv = 0; lcv < numberOfClasses; ++lcv)
{
classes[lcv] = new InnerClassesTable (iStream);
}
|
Methods Summary |
---|
public java.lang.String | toString(ConstantPoolInfo[] constantPool)Returns the InnerClassesAttribute attribute in a nice easy to
read format as a string.
ConstantUtf8Info utf8Info;
String s = new String ("");
utf8Info = (ConstantUtf8Info) constantPool[attributeNameIndex];
s = s + "\t" + utf8Info.toString () + "\tNot Done";
for (int lcv = 0; lcv < numberOfClasses; ++lcv)
s = s + "\n\t\t\t" + classes[lcv];
return s;
|
|