sysModel.classFile.constantPool
Class AClassNameTypePoolInfo

java.lang.Object
  extended by sysModel.classFile.constantPool.APoolInfo
      extended by sysModel.classFile.constantPool.AClassNameTypePoolInfo
Direct Known Subclasses:
FieldPoolInfo, InterfaceMethodPoolInfo, MethodPoolInfo

public abstract class AClassNameTypePoolInfo
extends APoolInfo

Represents an object in the constant pool described by class and name-and-type.

Author:
Mathias Ricken

Field Summary
protected  ClassPoolInfo _classInfo
          Class information.
protected  short _classInfoIndex
          Class index.
protected  NameAndTypePoolInfo _nameAndType
          NameAndType information.
protected  short _nameAndTypeIndex
          NameAndType index.
 
Fields inherited from class sysModel.classFile.constantPool.APoolInfo
_constantPool, _type, CONSTANT_Class, CONSTANT_Double, CONSTANT_Fieldref, CONSTANT_Float, CONSTANT_Integer, CONSTANT_InterfaceMethodref, CONSTANT_Long, CONSTANT_Methodref, CONSTANT_NameAndType, CONSTANT_String, CONSTANT_Utf8_ASCII, CONSTANT_Utf8_Unicode
 
Constructor Summary
AClassNameTypePoolInfo(int type, ClassPoolInfo clas, NameAndTypePoolInfo nameAndType, ConstantPool cp)
          Create a new object.
AClassNameTypePoolInfo(int type, java.io.DataInputStream dis, ConstantPool cp)
          Constructor reading from a stream.
 
Method Summary
 ClassPoolInfo getClassInfo()
          Accessor for the class information.
 NameAndTypePoolInfo getNameAndType()
          Accessor for the NameAndType information.
 int hashCode()
          Return a hash code.
 void reindex()
          Reindex constant pool indices.
 void resolve()
          Resolve constant pool objects.
 void setClassInfo(ClassPoolInfo classInfo)
          Mutator for the class information.
 void setNameAndType(NameAndTypePoolInfo nameAndType)
          Mutator for the NameAndType information.
 java.lang.String toString()
          Return a human-readable version of this constant pool object.
 java.lang.String toStringVerbose()
          Return a human-readable version of this constant pool object.
 void write(java.io.DataOutputStream dos)
          Write this constant pool object into the stream, including the type byte.
 
Methods inherited from class sysModel.classFile.constantPool.APoolInfo
equals, execute, inPool, read
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_classInfo

protected ClassPoolInfo _classInfo
Class information.


_nameAndType

protected NameAndTypePoolInfo _nameAndType
NameAndType information.


_classInfoIndex

protected short _classInfoIndex
Class index.


_nameAndTypeIndex

protected short _nameAndTypeIndex
NameAndType index.

Constructor Detail

AClassNameTypePoolInfo

public AClassNameTypePoolInfo(int type,
                              ClassPoolInfo clas,
                              NameAndTypePoolInfo nameAndType,
                              ConstantPool cp)
Create a new object.

Parameters:
type - type, either FIELD, METHOD or CONSTANT_InterfaceMethodref
clas - class information
nameAndType - NameAndType information
cp - constant pool

AClassNameTypePoolInfo

public AClassNameTypePoolInfo(int type,
                              java.io.DataInputStream dis,
                              ConstantPool cp)
                       throws java.io.IOException
Constructor reading from a stream.

Parameters:
type - type, either FIELD, METHOD or CONSTANT_InterfaceMethodref
dis - input stream
cp - constant pool
Throws:
java.io.IOException
Method Detail

getClassInfo

public ClassPoolInfo getClassInfo()
Accessor for the class information.

Returns:
class information

setClassInfo

public void setClassInfo(ClassPoolInfo classInfo)
Mutator for the class information.

Parameters:
classInfo - new class information

getNameAndType

public NameAndTypePoolInfo getNameAndType()
Accessor for the NameAndType information.

Returns:
NameAndType information

setNameAndType

public void setNameAndType(NameAndTypePoolInfo nameAndType)
Mutator for the NameAndType information.

Parameters:
nameAndType - new NameAndTypeInformation

write

public void write(java.io.DataOutputStream dos)
           throws java.io.IOException
Write this constant pool object into the stream, including the type byte.

Specified by:
write in class APoolInfo
Parameters:
dos - stream
Throws:
java.io.IOException

resolve

public void resolve()
Resolve constant pool objects. This makes sure that the object links match the index links.

Specified by:
resolve in class APoolInfo

reindex

public void reindex()
Reindex constant pool indices. This makes sure the index links match the object links.

Specified by:
reindex in class APoolInfo

toStringVerbose

public java.lang.String toStringVerbose()
Return a human-readable version of this constant pool object.

Specified by:
toStringVerbose in class APoolInfo
Returns:
string

toString

public java.lang.String toString()
Return a human-readable version of this constant pool object.

Specified by:
toString in class APoolInfo
Returns:
string

hashCode

public int hashCode()
Return a hash code.

Specified by:
hashCode in class APoolInfo
Returns:
hash code