edu.rice.cs.cunit.classFile.constantPool
Class MethodPoolInfo

java.lang.Object
  extended by edu.rice.cs.cunit.classFile.constantPool.APoolInfo
      extended by edu.rice.cs.cunit.classFile.constantPool.AClassNameTypePoolInfo
          extended by edu.rice.cs.cunit.classFile.constantPool.MethodPoolInfo

public class MethodPoolInfo
extends AClassNameTypePoolInfo

Represents a method in the constant pool.

Author:
Mathias Ricken

Field Summary
 
Fields inherited from class edu.rice.cs.cunit.classFile.constantPool.AClassNameTypePoolInfo
_classInfo, _classInfoIndex, _nameAndType, _nameAndTypeIndex
 
Fields inherited from class edu.rice.cs.cunit.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
MethodPoolInfo(ClassPoolInfo clas, NameAndTypePoolInfo nameAndType, ConstantPool cp)
          Constructor
MethodPoolInfo(java.io.DataInputStream dis, ConstantPool cp)
          Constructor reading from a stream.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compare this object and another one.
<R,D> R
execute(IPoolInfoVisitor<R,D> visitor, D data)
          Execute a visitor.
 java.lang.String toStringVerbose()
          Return a human-readable version of this constant pool object.
 
Methods inherited from class edu.rice.cs.cunit.classFile.constantPool.AClassNameTypePoolInfo
getClassInfo, getNameAndType, hashCode, reindex, resolve, setClassInfo, setNameAndType, toString, write
 
Methods inherited from class edu.rice.cs.cunit.classFile.constantPool.APoolInfo
inPool, read
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MethodPoolInfo

public MethodPoolInfo(ClassPoolInfo clas,
                      NameAndTypePoolInfo nameAndType,
                      ConstantPool cp)
Constructor

Parameters:
clas - class information
nameAndType - NameAndType information

MethodPoolInfo

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

Parameters:
dis - input stream
cp - constant pool
Throws:
java.io.IOException
Method Detail

toStringVerbose

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

Specified by:
toStringVerbose in class APoolInfo
Returns:
string

equals

public boolean equals(java.lang.Object obj)
Compare this object and another one.

Specified by:
equals in class APoolInfo
Parameters:
obj - other object
Returns:
true if the same

execute

public <R,D> R execute(IPoolInfoVisitor<R,D> visitor,
                       D data)
Execute a visitor.

Specified by:
execute in class APoolInfo
Parameters:
visitor - visitor
data - visitor-specific parameter
Returns:
visitor-specific return value