Class Insert


  • public class Insert
    extends Transform
    An argument insertion transform. Equivalent call: MethodHandles.insertArguments(MethodHandle, int, Object...).
    • Constructor Detail

      • Insert

        public Insert​(int position,
                      Object... values)
      • Insert

        public Insert​(int position,
                      boolean value)
      • Insert

        public Insert​(int position,
                      byte value)
      • Insert

        public Insert​(int position,
                      short value)
      • Insert

        public Insert​(int position,
                      char value)
      • Insert

        public Insert​(int position,
                      int value)
      • Insert

        public Insert​(int position,
                      long value)
      • Insert

        public Insert​(int position,
                      float value)
      • Insert

        public Insert​(int position,
                      double value)
      • Insert

        public Insert​(int position,
                      Class<?>[] types,
                      Object... values)
    • Method Detail

      • up

        public MethodHandle up​(MethodHandle target)
        Description copied from class: Transform
        Apply this transform upward from the given MethodHandle, producing a new handle.
        Specified by:
        up in class Transform
        Parameters:
        target - the target handle
        Returns:
        the adapted handle
      • down

        public MethodType down​(MethodType type)
        Description copied from class: Transform
        Apply this transform downward from an incoming MethodType, producing a new type.
        Specified by:
        down in class Transform
        Parameters:
        type - the source type
        Returns:
        the new type
      • toString

        public String toString()
        Description copied from class: Transform
        Return a string representation of this transform.
        Specified by:
        toString in class Transform
        Returns:
        a string representation of this transform
      • toJava

        public String toJava​(MethodType incoming)
        Description copied from class: Transform
        Return a Java code representation of this transform.
        Specified by:
        toJava in class Transform
        Returns:
        a Java code representation of this transform.