at.dms.classfile
Class InnerClassInfo

java.lang.Object
  |
  +--at.dms.classfile.InnerClassInfo

public class InnerClassInfo
extends java.lang.Object

A helper class for InnerClassTable. The inner class table contains an array this type. InnerClassInfo contains information about one specific inner class that is used in another class.


Constructor Summary
InnerClassInfo(java.io.DataInput in, ConstantPool cp)
          Create an entry in the inner class table from a class file stream.
InnerClassInfo(java.lang.String innerClass, java.lang.String outerClass, java.lang.String simpleName, short modifiers)
          Create an entry in the inner class table.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compares this object with another object.
 boolean equalsInnerClassInfo(InnerClassInfo other)
          Compares with another InnerClassInfo object.
 ClassConstant getInnerClass()
          Returns the FQN of the inner class.
 int getModifiers()
          Returns the modifiers that the inner class had in the source code.
 ClassConstant getOuterClass()
          Returns the FQN of the outer class, if it is a member class; else null.
 java.lang.String getQualifiedName()
          Return the qualified name of this class.
 java.lang.String getSimpleName()
          Returns the name that the class had in the source code, or null if it is an anonymous class.
 int hashCode()
          Returns a hash code for this object.
(package private)  void resolveConstants(ConstantPool cp)
          Insert or check location of constant value on constant pool.
(package private)  void write(ConstantPool cp, java.io.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, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InnerClassInfo

public InnerClassInfo(java.lang.String innerClass,
                      java.lang.String outerClass,
                      java.lang.String simpleName,
                      short modifiers)
Create an entry in the inner class table.
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(java.io.DataInput in,
                      ConstantPool cp)
               throws java.io.IOException
Create an entry in the inner class table from a class file stream.
Parameters:
in - The stream to read from.
cp - The constant pool.
Throws:
java.io.IOException - An io problem has occured.
Method Detail

getModifiers

public int getModifiers()
Returns the modifiers that the inner class had in the source code.

getOuterClass

public ClassConstant getOuterClass()
Returns the FQN of the outer class, if it is a member class; else null.

getInnerClass

public ClassConstant getInnerClass()
Returns the FQN of the inner class.

getSimpleName

public java.lang.String getSimpleName()
Returns the name that the class had in the source code, or null if it is an anonymous class.

getQualifiedName

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

equals

public boolean equals(java.lang.Object o)
Compares this object with another object. This will only result in true of the other object is of the same subclass of InnerClassInfo as this one, and all fields are equals.
Overrides:
equals in class java.lang.Object

equalsInnerClassInfo

public boolean equalsInnerClassInfo(InnerClassInfo other)
Compares with another InnerClassInfo object. Will only return true of contents are completely the same.

hashCode

public int hashCode()
Returns a hash code for this object.
Overrides:
hashCode in class java.lang.Object

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,
           java.io.DataOutput out)
     throws java.io.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:
java.io.IOException - An io problem has occured.