Class MethodHandleItem


  • public class MethodHandleItem
    extends Item<MethodHandle>
    Represents a CONSTANT_MethodHandle entry in the constant pool.
    • Constructor Detail

      • MethodHandleItem

        public MethodHandleItem()
    • Method Detail

      • setMethodHandle

        public void setMethodHandle​(MethodHandle methodHandle)
        Sets the method handle value.
        Parameters:
        methodHandle - the method handle to set
      • 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<MethodHandle>
        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<MethodHandle>
        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<MethodHandle>
        Returns:
        The constant pool tag.
      • getValue

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