Class LongItem


  • public class LongItem
    extends Item<Long>
    Represents a CONSTANT_Long entry in the constant pool.
    • Constructor Detail

      • LongItem

        public LongItem()
    • Method Detail

      • setValue

        public void setValue​(Long value)
        Sets the constant this item holds.
        Parameters:
        value - the long value
      • read

        public void read​(ClassFile classFile)
        Description copied from class: Item
        Reads the constant pool item from the class file.
        Specified by:
        read in class Item<Long>
        Parameters:
        classFile - The ClassFile utility to read data.
      • write

        public void write​(DataOutputStream dos)
                   throws IOException
        Description copied from class: Item
        Writes the item to the output stream (excluding the tag byte, which is written by the caller).
        Specified by:
        write in class Item<Long>
        Parameters:
        dos - The output stream to write to.
        Throws:
        IOException - If an I/O error occurs.
      • getType

        public byte getType()
        Description copied from class: Item
        Returns the type of the constant pool item.
        Specified by:
        getType in class Item<Long>
        Returns:
        The constant pool tag.
      • getValue

        public Long getValue()
        Description copied from class: Item
        Returns the value held by the constant pool item.
        Specified by:
        getValue in class Item<Long>
        Returns:
        The value of type T.