classycle.classfile
Class StringConstant

java.lang.Object
  extended by classycle.classfile.Constant
      extended by classycle.classfile.StringConstant

public class StringConstant
extends Constant

Constant of a String value.

Author:
Franz-Josef Elmer

Constructor Summary
StringConstant(Constant[] pool, int stringIndex)
          Creates an instance for the specfied index.
 
Method Summary
 java.lang.String getString()
          Returns the string value.
 java.lang.String toString()
          Returns the constant type and the string value.
 
Methods inherited from class classycle.classfile.Constant
extractConstantPool, getConstant
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringConstant

public StringConstant(Constant[] pool,
                      int stringIndex)
Creates an instance for the specfied index.

Parameters:
pool - Constant pool. Needed for resolving the reference.
stringIndex - Index of an UTF8Constant.
Method Detail

getString

public java.lang.String getString()
Returns the string value.


toString

public java.lang.String toString()
Returns the constant type and the string value.

Overrides:
toString in class java.lang.Object