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

ConstClass

public class ConstClass extends ConstBasic
Class representing a class reference in the constant pool

Fields Summary
public static final int
MyTag
private ConstUtf8
theClassName
private int
theClassNameIndex
Constructors Summary
public ConstClass(ConstUtf8 cname)
Construct a ConstClass

    theClassName = cname;
  
ConstClass(int cname)

    theClassNameIndex = cname;
  
Methods Summary
public java.lang.StringasString()
Return the class name in simple string form

    return theClassName.asString();
  
public voidchangeClass(ConstUtf8 newName)
Change the class reference (not to be done lightly)

    theClassName = newName;
    theClassNameIndex = newName.getIndex();
  
public ConstUtf8className()
Return the class name

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

    b.writeShort(theClassName.getIndex());
  
static com.sun.jdo.api.persistence.enhancer.classfile.ConstClassread(java.io.DataInputStream input)

    return new ConstClass (input.readUnsignedShort());
  
voidresolve(ConstantPool p)

    theClassName = (ConstUtf8) p.constantAt(theClassNameIndex);
  
public inttag()
Return the tag for this constant


  /* public accessors */

           
       return MyTag; 
public java.lang.StringtoString()
A printable representation

      return "CONSTANTClass(" + indexAsString() + "): " + //NOI18N
          "className(" + theClassName.toString() + ")";//NOI18N