FileDocCategorySizeDatePackage
ConstBasicMemberRef.javaAPI DocGlassfish v2 API3907Fri May 04 22:34:28 BST 2007com.sun.jdo.api.persistence.enhancer.classfile

ConstBasicMemberRef

public abstract class ConstBasicMemberRef extends ConstBasic
The abstract base class used to represent the various type of references to members (fields/methods) within the constant pool.

Fields Summary
protected ConstClass
theClassName
protected int
theClassNameIndex
protected ConstNameAndType
theNameAndType
protected int
theNameAndTypeIndex
Constructors Summary
ConstBasicMemberRef(ConstClass cname, ConstNameAndType NT)
Constructor for "from scratch" creation

    theClassName = cname;
    theNameAndType = NT;
  
ConstBasicMemberRef(int cnameIndex, int NT_index)
Constructor for reading from a class file

    theClassNameIndex = cnameIndex;
    theNameAndTypeIndex = NT_index;
  
Methods Summary
public ConstClassclassName()
Return the name of the class defining the member

    return theClassName;
  
voidformatData(java.io.DataOutputStream b)

    b.writeShort(theClassName.getIndex());
    b.writeShort(theNameAndType.getIndex());
  
public ConstNameAndTypenameAndType()
Return the name and type of the member

    return theNameAndType;
  
voidresolve(ConstantPool p)

    theClassName = (ConstClass) p.constantAt(theClassNameIndex);
    theNameAndType = (ConstNameAndType) p.constantAt(theNameAndTypeIndex);
  
public java.lang.StringtoString()

      return "className(" + theClassName.toString() + ")" +//NOI18N
          " nameAndType(" + theNameAndType.toString() + ")";//NOI18N