jrre.classloader.classfile.pool_entries
Class CPFieldRef

java.lang.Object
  |
  +--jrre.classloader.classfile.pool_entries.CPInfo
        |
        +--jrre.classloader.classfile.pool_entries.CPFieldRef

public class CPFieldRef
extends CPInfo

A constant pool field referance. It contains index's in the constant pool to a (class info) and a (name and type info). These are a fields parent class and its name and object type. For Example: class Boat { public Motor m = new Motor(); } Boat b = new Boat(); (class info) gets Boat (name and type info) (name) gets b (type) gets Boat

Author:
Christopher Ellsworth (Chris@chrisellsworth.com)
, Clarence Alston (massclax@hotmail.com)

Field Summary
 
Fields inherited from class jrre.classloader.classfile.pool_entries.CPInfo
C_Class, C_Double, C_FieldRef, C_Float, C_Integer, C_InterfaceMethodRef, C_Long, C_MethodRef, C_NameType, C_String, C_UTF8, tag
 
Constructor Summary
CPFieldRef(int classIndex, int nameType)
          Constructs the field referance.
 
Method Summary
 int getClassIndex()
          Gets the ClassIndex.
 int getNameType()
          Gets the NameType.
 int getNameTypeIndex()
           
 void setClassIndex(int classIndex)
          Sets the ClassIndex.
 void setNameType(int nameType)
          Sets the NameType.
 java.lang.String toString()
          Gets the string representation of this field referance.
 
Methods inherited from class jrre.classloader.classfile.pool_entries.CPInfo
getTag, setTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CPFieldRef

public CPFieldRef(int classIndex,
                  int nameType)
Constructs the field referance.

Parameters:
classIndex - The index in the constant pool to the class that contains this field.
nameType - The index in the constant pool to the fields name and type.
Method Detail

getClassIndex

public int getClassIndex()
Gets the ClassIndex.


setClassIndex

public void setClassIndex(int classIndex)
Sets the ClassIndex.


getNameTypeIndex

public int getNameTypeIndex()

getNameType

public int getNameType()
Gets the NameType.


setNameType

public void setNameType(int nameType)
Sets the NameType.


toString

public java.lang.String toString()
Gets the string representation of this field referance.

Specified by:
toString in class CPInfo
Returns:
A string representing the field.


Copyright © 2002-2002 Appalachian State University. All Rights Reserved.