Class Varargs

java.lang.Object
com.headius.invokebinder.transform.Transform
com.headius.invokebinder.transform.Varargs

public class Varargs extends Transform
An argument-boxing transform. Equivalent call: MethodHandle.asVarargsCollector(Class)
  • Field Details

    • source

      private final MethodType source
    • index

      private int index
    • arrayType

      private final Class arrayType
  • Constructor Details

    • Varargs

      public Varargs(MethodType source, int index, Class arrayType)
  • Method Details

    • 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
    • assertTypesAreCompatible

      private void assertTypesAreCompatible()
    • toString

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