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