Class Insert


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

      Constructors 
      Constructor Description
      Insert​(int position, boolean value)  
      Insert​(int position, byte value)  
      Insert​(int position, char value)  
      Insert​(int position, double value)  
      Insert​(int position, float value)  
      Insert​(int position, int value)  
      Insert​(int position, long value)  
      Insert​(int position, short value)  
      Insert​(int position, java.lang.Class<?>[] types, java.lang.Object... values)  
      Insert​(int position, java.lang.Object... values)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.invoke.MethodType down​(java.lang.invoke.MethodType type)
      Apply this transform downward from an incoming MethodType, producing a new type.
      java.lang.String toJava​(java.lang.invoke.MethodType incoming)
      Return a Java code representation of this transform.
      java.lang.String toString()
      Return a string representation of this transform.
      java.lang.invoke.MethodHandle up​(java.lang.invoke.MethodHandle target)
      Apply this transform upward from the given MethodHandle, producing a new handle.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Insert

        public Insert​(int position,
                      java.lang.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,
                      java.lang.Class<?>[] types,
                      java.lang.Object... values)
    • Method Detail

      • up

        public java.lang.invoke.MethodHandle up​(java.lang.invoke.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 java.lang.invoke.MethodType down​(java.lang.invoke.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 java.lang.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 java.lang.String toJava​(java.lang.invoke.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.