FileDocCategorySizeDatePackage
InnerClassesTable.javaAPI DocJ2ME CLDC 1.13407Wed Feb 05 15:56:04 GMT 2003kdp.classparser.attributes

InnerClassesTable

public class InnerClassesTable extends Object
Represents an individual entry in the InnerClasses table of a Java class file. This class has never been thoroughly tested.
author
Aaron Dietrich
version
$Id: InnerClassesTable.java,v 1.1.1.1 2000/07/07 13:34:24 jrv Exp $ Revision History $Log: InnerClassesTable.java,v $ Revision 1.1.1.1 2000/07/07 13:34:24 jrv Initial import of kdp code Revision 1.1.1.1 2000/05/31 19:14:47 ritsun Initial import of kvmdt to CVS Revision 1.1 2000/04/25 00:30:39 ritsun Initial revision

Fields Summary
private static final int
ACC_PUBLIC
Access flags for inner classes
private static final int
ACC_PRIVATE
private static final int
ACC_PROTECTED
private static final int
ACC_STATIC
private static final int
ACC_FINAL
private static final int
ACC_INTERFACE
private static final int
ACC_ABSTRACT
private int
innerClassInfoIndex
constant pool index identifying the inner class
private int
outerClassInfoIndex
constant pool index identifying the outer class
private int
innerNameIndex
the index of the name of the inner class
private int
innerClassAccessFlags
access flags of the inner class
Constructors Summary
public InnerClassesTable(DataInputStream iStream)
Constructor. Just read in all the fields.

param
iStream input stream to read from
exception
IOException just pass io exceptions up


                                                           
        
     
      innerClassInfoIndex = iStream.readUnsignedShort ();
      outerClassInfoIndex = iStream.readUnsignedShort ();
      innerNameIndex = iStream.readUnsignedShort ();
      innerClassAccessFlags = iStream.readUnsignedShort ();
     
Methods Summary
public java.lang.StringtoString()
Convert the information we have into an easy to read format and return as a string.

return
String the info we have as a string

      String                s = new String ("");

      s = s + "\n\tinnerClassInfoIndex=" + innerClassInfoIndex;
      s = s + "\n\touterClassInfoIndex=" + outerClassInfoIndex;
      s = s + "\n\tinnerNameIndex=" + innerNameIndex;
      s = s + "\n\tinnerClassAccessFlags=";

      if ((innerClassAccessFlags & ACC_PUBLIC) > 0)
        s = s + "public ";

      if ((innerClassAccessFlags & ACC_PRIVATE) > 0)
        s = s + "private ";

      if ((innerClassAccessFlags & ACC_PROTECTED) > 0)
        s = s + "protected ";

      if ((innerClassAccessFlags & ACC_STATIC) > 0)
        s = s + "static ";

      if ((innerClassAccessFlags & ACC_FINAL) > 0)
        s = s + "final ";

      if ((innerClassAccessFlags & ACC_INTERFACE) > 0)
        s = s + "interface ";

      if ((innerClassAccessFlags & ACC_ABSTRACT) > 0)
        s = s + "abstract";

      return s;