Class 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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getString()
      Returns the string value.
      java.lang.String toString()
      Returns the constant type and the string value.
      • 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