FileDocCategorySizeDatePackage
StringCPInfo.javaAPI DocApache Ant 1.702485Wed Dec 13 06:16:20 GMT 2006org.apache.tools.ant.taskdefs.optional.depend.constantpool

StringCPInfo

public class StringCPInfo extends ConstantCPInfo
A String Constant Pool Entry. The String info contains an index into the constant pool where a UTF8 string is stored.

Fields Summary
private int
index
the index into the constant pool containing the string's content
Constructors Summary
public StringCPInfo()
Constructor.

        super(CONSTANT_STRING, 1);
    
Methods Summary
public voidread(java.io.DataInputStream cpStream)
read a constant pool entry from a class stream.

param
cpStream the DataInputStream which contains the constant pool entry to be read.
exception
IOException if there is a problem reading the entry from the stream.

        index = cpStream.readUnsignedShort();

        setValue("unresolved");
    
public voidresolve(ConstantPool constantPool)
Resolve this constant pool entry with respect to its dependents in the constant pool.

param
constantPool the constant pool of which this entry is a member and against which this entry is to be resolved.

        setValue(((Utf8CPInfo) constantPool.getEntry(index)).getValue());
        super.resolve(constantPool);
    
public java.lang.StringtoString()
Print a readable version of the constant pool entry.

return
the string representation of this constant pool entry.

        return "String Constant Pool Entry for "
            + getValue() + "[" + index + "]";