Class IntegerItem


  • public class IntegerItem
    extends Item<Integer>
    A CONSTANT_Integer constant pool entry.
    • Constructor Detail

      • IntegerItem

        public IntegerItem()
    • Method Detail

      • setValue

        public void setValue​(Integer value)
        Replaces the constant this entry holds.
        Parameters:
        value - the new integer constant
      • 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<Integer>
        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<Integer>
        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<Integer>
        Returns:
        The constant pool tag.
      • getValue

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