mjc

org.multijava.util.classfile
Class InnerClassInfo

java.lang.Object
  extended byorg.multijava.util.classfile.InnerClassInfo
All Implemented Interfaces:
Comparable

public class InnerClassInfo
extends Object
implements Comparable

This class represents a single entry in the array of classes stored inside an InnerClasses attribute. See JVM2, 4.7.5.

See Also:
InnerClassTable

Field Summary
private  ClassConstant innerClass
           
private  short modifiers
           
private  ClassConstant outerClass
           
private  AsciiConstant simpleName
           
 
Constructor Summary
InnerClassInfo(DataInput in, ConstantPool cp)
          Create a classes entry within an InnerClasses attribute.c
InnerClassInfo(String innerClass, String outerClass, String simpleName, short modifiers)
          Create a classes entry within an InnerClasses attribute.
 
Method Summary
 int compareTo(Object o)
           
 short getModifiers()
          Return the modifiers bit-mask of this class
 String getQualifiedName()
          Return the qualified name of this class
 boolean isAnonymous()
          Returns true if this represents an InnerClasses attribute entry for an anonymous class.
 boolean isMember()
          Returns true if this represents an InnerClasses attribute entry for a member type of the class file in which the attribute appears.
 String outerClassName()
          Return the name of the outer class of this.
(package private)  void resolveConstants(ConstantPool cp)
          Insert or check location of constant value on constant pool
 String toString()
           
(package private)  void write(ConstantPool cp, DataOutput out)
          Write this class into the the file (out) getting data position from the constant pool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

innerClass

private ClassConstant innerClass

outerClass

private ClassConstant outerClass

simpleName

private AsciiConstant simpleName

modifiers

private short modifiers
Constructor Detail

InnerClassInfo

public InnerClassInfo(String innerClass,
                      String outerClass,
                      String simpleName,
                      short modifiers)
Create a classes entry within an InnerClasses attribute.

Parameters:
innerClass - the encoded name of the (inner) class
outerClass - the defining scope of the (inner) class
simpleName - the simple name of the (inner) class
modifiers - access permission to and properties of the class

InnerClassInfo

public InnerClassInfo(DataInput in,
                      ConstantPool cp)
               throws IOException
Create a classes entry within an InnerClasses attribute.c

Parameters:
in - the stream to read from
cp - the constant pool
Throws:
IOException - an io problem has occured
Method Detail

getQualifiedName

public String getQualifiedName()
Return the qualified name of this class


outerClassName

public String outerClassName()
Return the name of the outer class of this.


getModifiers

public short getModifiers()
Return the modifiers bit-mask of this class


isAnonymous

public boolean isAnonymous()
Returns true if this represents an InnerClasses attribute entry for an anonymous class. That is, the simpleName field is null.


isMember

public boolean isMember()
Returns true if this represents an InnerClasses attribute entry for a member type of the class file in which the attribute appears. That is, the outerClass field is not null.


toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(Object o)
              throws ClassCastException
Specified by:
compareTo in interface Comparable
Throws:
ClassCastException

resolveConstants

void resolveConstants(ConstantPool cp)
Insert or check location of constant value on constant pool

Parameters:
cp - the constant pool for this class

write

void write(ConstantPool cp,
           DataOutput out)
     throws IOException
Write this class into the the file (out) getting data position from the constant pool

Parameters:
cp - the constant pool that contain all data
out - the file where to write this object info
Throws:
IOException - an io problem has occured

mjc

mjc is Copyright (C) 2000-2004 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. mjc is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.