FileDocCategorySizeDatePackage
JConstantString.javaAPI DocphoneME MR2 API (J2ME)2174Wed May 02 18:00:40 BST 2007com.sun.satsa.jcrmic.classfile.constants

JConstantString

public class JConstantString extends JConstant
This class represents String constant.

Fields Summary
private int
stringIndex
Value index.
private String
theString
The value.
Constructors Summary
public JConstantString(JConstantPool cp)
Constructor.

param
cp constant pool reference

        super(cp);
    
Methods Summary
public java.lang.StringgetString()
Returns the value.

return
the value.

        resolve();
        return theString;
    
public voidparse(java.io.DataInputStream dis)
Parses constant pool entry.

param
dis input stream
throws
IOException if I/O exception occurs

        stringIndex = dis.readUnsignedShort();
    
private voidresolve()
Resolves the constant pool entry.


        if (! resolved) {
            theString = cp.getConstantUtf8(stringIndex).getString();
            resolved = true;
        }