Package classycle.classfile

# Class StringConstant

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

public class StringConstant extends Constant
Constant of a `String` value.

Author:
  Franz-Josef Elmer

## Constructor Summary

Constructors
Constructor
Description
`StringConstant(Constant[] pool, int stringIndex)`
Creates an instance for the specfied index.

## Method Summary

Modifier and Type
Method
Description
`String`
`getString()`
Returns the string value.
`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 Details

### 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 Details

### getString

public String getString()
Returns the string value.

### toString

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

Overrides:
  `toString` in class `Object`