com.go.trove.classfile
Class ConstantInfo

java.lang.Object
  |
  +--com.go.trove.classfile.ConstantInfo
Direct Known Subclasses:
ConstantClassInfo, ConstantDoubleInfo, ConstantFieldInfo, ConstantFloatInfo, ConstantIntegerInfo, ConstantInterfaceMethodInfo, ConstantLongInfo, ConstantMethodInfo, ConstantNameAndTypeInfo, ConstantStringInfo, ConstantUTFInfo

public abstract class ConstantInfo
extends java.lang.Object

This class corresponds to the cp_info structure as defined in section 4.4 of The Java Virtual Machine Specification. Subclasses should override the default hashCode and equals methods so that the ConstantPool will only contain one instance of this constant.

Version:
21 , 9/07/00
Author:
Brian S O'Neill

Constructor Summary
protected ConstantInfo(int tag)
           
 
Method Summary
 int getIndex()
          The index of this constant in the constant pool.
 void writeTo(java.io.DataOutput dout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantInfo

protected ConstantInfo(int tag)
Method Detail

getIndex

public int getIndex()
The index of this constant in the constant pool. Is -1 if the index has not yet been resolved. Constant pool indexes are resolved when the constant pool is written out.

writeTo

public void writeTo(java.io.DataOutput dout)
             throws java.io.IOException