Class ConstantStringInfo

  • All Implemented Interfaces:
    ConstantTypes

    public class ConstantStringInfo
    extends ConstantPoolInfo
    Class corresponding to the CONSTANT_String_info structure.
    Version:
    1.0
    • Field Detail

      • stringIndex

        private int stringIndex
    • Constructor Detail

      • ConstantStringInfo

        public ConstantStringInfo​(ClassFile cf,
                                  int stringIndex)
        Constructor.
        Parameters:
        cf - The class file being parsed.
        stringIndex - The string index.
    • Method Detail

      • getStringIndex

        public int getStringIndex()
      • getStringValue

        public java.lang.String getStringValue()
        Returns the string represented by this constant.
        Returns:
        The string value represented.
      • toString

        public java.lang.String toString()
        Returns a string representation of this object. Useful for debugging.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of this object.