com.vladium.jcd.cls.constant
Class CONSTANT_ref_info

java.lang.Object
  extended by com.vladium.jcd.cls.constant.CONSTANT_info
      extended by com.vladium.jcd.cls.constant.CONSTANT_ref_info
All Implemented Interfaces:
IClassFormatOutput, java.lang.Cloneable
Direct Known Subclasses:
CONSTANT_Fieldref_info, CONSTANT_InterfaceMethodref_info, CONSTANT_Methodref_info

public abstract class CONSTANT_ref_info
extends CONSTANT_info

Abstract base for all CONSTANT_XXXref_info structures. They all have a constant pool pointer to a CONSTANT_Class_info and CONSTANT_NameAndType_info entries.

The value of the class_index item must be a valid index into the constant pool table. The constant pool entry at that index must be a CONSTANT_Class_info structure representing the class or interface type that contains the declaration of the field or method.

The class_index item of a CONSTANT_Fieldref_info or a CONSTANT_Methodref_info structure must be a class type, not an interface type. The class_index item of a CONSTANT_InterfaceMethodref_info structure must be an interface type that declares the given method.

Author:
(C) 2001, Vlad Roubtsov
See Also:
CONSTANT_Fieldref_info, CONSTANT_Methodref_info, CONSTANT_InterfaceMethodref_info

Field Summary
 int m_class_index
           
 int m_name_and_type_index
           
 
Constructor Summary
protected CONSTANT_ref_info(int class_index, int name_and_type_index)
           
protected CONSTANT_ref_info(UDataInputStream bytes)
           
 
Method Summary
 void writeInClassFormat(UDataOutputStream out)
           
 
Methods inherited from class com.vladium.jcd.cls.constant.CONSTANT_info
accept, clone, new_CONSTANT_info, tag, tagToString, toString, width
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_class_index

public int m_class_index

m_name_and_type_index

public int m_name_and_type_index
Constructor Detail

CONSTANT_ref_info

protected CONSTANT_ref_info(UDataInputStream bytes)
                     throws java.io.IOException
Throws:
java.io.IOException

CONSTANT_ref_info

protected CONSTANT_ref_info(int class_index,
                            int name_and_type_index)
Method Detail

writeInClassFormat

public void writeInClassFormat(UDataOutputStream out)
                        throws java.io.IOException
Specified by:
writeInClassFormat in interface IClassFormatOutput
Overrides:
writeInClassFormat in class CONSTANT_info
Throws:
java.io.IOException