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

ConstString

public class ConstString extends ConstValue
Class representing a class specification in the constant pool

Fields Summary
public static final int
MyTag
private ConstUtf8
stringValue
private int
stringValueIndex
Constructors Summary
ConstString(ConstUtf8 s)

    stringValue = s;
  
ConstString(int sIndex)

    stringValueIndex = sIndex;
  
Methods Summary
public java.lang.Stringdescriptor()
Return the descriptor string for the constant type.

      return "Ljava/lang/String;";//NOI18N
  
voidformatData(java.io.DataOutputStream b)

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

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

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


  /* public accessors */

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

      return "CONSTANTString(" + indexAsString() + "): " + //NOI18N
          "string(" + stringValue.asString() + ")";//NOI18N
  
public ConstUtf8value()
Return the utf8 string calue

    return stringValue;