Class Utf8CpInfo

  • All Implemented Interfaces:
    ClassConstants

    public class Utf8CpInfo
    extends CpInfo
    Representation of a 'UTF8' entry in the ConstantPool.
    • Constructor Detail

      • Utf8CpInfo

        protected Utf8CpInfo()
        Instantiates a new Utf 8 cp info.
      • Utf8CpInfo

        public Utf8CpInfo​(java.lang.String s)
        Ctor used when appending fresh Utf8 entries to the constant pool.
        Parameters:
        s - the s
    • Method Detail

      • decRefCount

        public void decRefCount()
        Decrement the reference count, blanking the entry if no more references.
        Overrides:
        decRefCount in class CpInfo
      • getString

        public java.lang.String getString()
        Return UTF8 data as a String.
        Returns:
        the string
      • setString

        public void setString​(java.lang.String str)
        Set UTF8 data as String.
        Parameters:
        str - the str
      • clearString

        public void clearString()
        Set the UTF8 data to empty.
      • readInfo

        protected void readInfo​(java.io.DataInput din)
                         throws java.io.IOException
        Read the 'info' data following the u1tag byte.
        Specified by:
        readInfo in class CpInfo
        Parameters:
        din - the din
        Throws:
        java.io.IOException - the io exception
      • writeInfo

        protected void writeInfo​(java.io.DataOutput dout)
                          throws java.io.IOException
        Write the 'info' data following the u1tag byte.
        Specified by:
        writeInfo in class CpInfo
        Parameters:
        dout - the dout
        Throws:
        java.io.IOException - the io exception