Class Utf8Constant

    • Constructor Detail

      • Utf8Constant

        public Utf8Constant()
        Creates an uninitialized Utf8Constant.
      • Utf8Constant

        public Utf8Constant​(java.lang.String string)
        Creates a Utf8Constant containing the given string.
    • Method Detail

      • setBytes

        public void setBytes​(byte[] bytes)
        Initializes the UTF-8 data with an array of bytes.
      • getBytes

        public byte[] getBytes()
        Returns the UTF-8 data as an array of bytes.
      • setString

        public void setString​(java.lang.String utf8String)
        Initializes the UTF-8 data with a String.
      • getString

        public java.lang.String getString()
        Returns the UTF-8 data as a String.
      • getTag

        public int getTag()
        Description copied from class: Constant
        Returns the constant pool info tag that specifies the entry type.
        Specified by:
        getTag in class Constant
      • isCategory2

        public boolean isCategory2()
        Description copied from class: Constant
        Returns whether the constant is of category 2. This means that it takes up the space of two category 1 types in the constant pool or on the stack, for instance.
        Specified by:
        isCategory2 in class Constant
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object