Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class DE.fub.inf.JVM.JavaClass.ConstantCP

java.lang.Object
  |
  +--DE.fub.inf.JVM.JavaClass.Constant
        |
        +--DE.fub.inf.JVM.JavaClass.ConstantCP
Subclasses:
ConstantFieldref, ConstantInterfaceMethodref, ConstantMethodref

public abstract class ConstantCP
extends Constant
Abstract super class for Fieldref and Methodref constants.

Version:
$Id: ConstantCP.java,v 1.1 1998/07/01 13:08:17 dahm Exp $
Author:
M. Dahm
See Also:
ConstantFieldref, ConstantMethodref, ConstantInterfaceMethodref

Field Summary
int class_index
          References to the constants containing the class and the field signature
int name_and_type_index
          References to the constants containing the class and the field signature
 
Fields inherited from class DE.fub.inf.JVM.JavaClass.Constant
tag
 
Constructor Summary
ConstantCP(ConstantCP c)
          Initialize from another object.
ConstantCP(byte tag, int class_index, int name_and_type_index)
           
 
Method Summary
void dump(java.io.DataOutputStream file)
          Dump constant field reference to file stream in binary format.
int getClassIndex()
           
int getNameAndTypeIndex()
           
void setClassIndex(int class_index)
           
void setNameAndTypeIndex(int name_and_type_index)
           
java.lang.String toString()
           
 
Methods inherited from class DE.fub.inf.JVM.JavaClass.Constant
accept, copy, dump, getTag, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Field Detail

class_index

protected int class_index
References to the constants containing the class and the field signature

name_and_type_index

protected int name_and_type_index
References to the constants containing the class and the field signature
Constructor Detail

ConstantCP

public ConstantCP(ConstantCP c)
Initialize from another object.

ConstantCP

public ConstantCP(byte tag,
                  int class_index,
                  int name_and_type_index)
Parameters:
class_index - Reference to the class containing the field
name_and_type_index - and the field signature
Method Detail

dump

public final void dump(java.io.DataOutputStream file)
               throws java.io.IOException
Dump constant field reference to file stream in binary format.
Parameters:
file - Output file stream
Overrides:
dump in class Constant

getClassIndex

public final int getClassIndex()
Returns:
Reference (index) to class this field belongs to.

getNameAndTypeIndex

public final int getNameAndTypeIndex()
Returns:
Reference (index) to signature of the field.

setClassIndex

public final void setClassIndex(int class_index)
Parameters:
class_index - points to Constant_class

setNameAndTypeIndex

public final void setNameAndTypeIndex(int name_and_type_index)
Parameters:
name_and_type_index - points to Constant_NameAndType

toString

public final java.lang.String toString()
Returns:
String representation.
Overrides:
toString in class Constant

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD