Class Collect
- java.lang.Object
-
- com.headius.invokebinder.transform.Transform
-
- com.headius.invokebinder.transform.Collect
-
public class Collect extends Transform
An argument-boxing transform with a fixed incoming size. Equivalent call: MethodHandle.asCollector(Class, int) or MethodHandles.collectArguments
-
-
Constructor Summary
Constructors Constructor Description Collect(MethodType source, int index, int count, Class<?> arrayType)
Collect(MethodType source, int index, int count, Class<?> arrayType, MethodHandle collector)
Collect(MethodType source, int index, Class<?> arrayType)
Collect(MethodType source, int index, Class<?> arrayType, MethodHandle collector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodType
down(MethodType type)
Apply this transform downward from an incoming MethodType, producing a new type.String
toJava(MethodType incoming)
Return a Java code representation of this transform.String
toString()
Return a string representation of this transform.MethodHandle
up(MethodHandle target)
Apply this transform upward from the given MethodHandle, producing a new handle.-
Methods inherited from class com.headius.invokebinder.transform.Transform
buildClassArgument, buildClassArguments, buildClassCast, buildPrimitiveJava, generateMethodType
-
-
-
-
Constructor Detail
-
Collect
public Collect(MethodType source, int index, Class<?> arrayType)
-
Collect
public Collect(MethodType source, int index, Class<?> arrayType, MethodHandle collector)
-
Collect
public Collect(MethodType source, int index, int count, Class<?> arrayType)
-
Collect
public Collect(MethodType source, int index, int count, Class<?> arrayType, MethodHandle collector)
-
-
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.
-
down
public MethodType down(MethodType type)
Description copied from class:Transform
Apply this transform downward from an incoming MethodType, producing a new type.
-
toString
public String toString()
Description copied from class:Transform
Return 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.
-
-