Top Description Fields Constructors Methods
com.headius.invokebinder.transform

public Class Spread

extends Transform
Class Inheritance
Imports
com.headius.invokebinder.InvalidTransformException, java.lang.invoke.MethodHandle, .MethodType

An array-spreading transform. Equivalent call: MethodHandles.spreadInvoker(MethodType, int).bindTo(MethodHandle)

Field Summary

Modifier and TypeField and Description
private final MethodType
private final Class<?>[]

Constructor Summary

AccessConstructor and Description
public
Spread(MethodType source, Class<?>... spreadTypes)

Method Summary

Modifier and TypeMethod and Description
public MethodType
down(MethodType
the source type
type
)

Implements abstract com.headius.invokebinder.transform.Transform.down.

Apply this transform downward from an incoming MethodType, producing a new type.
public String
toJava(MethodType incoming)

Implements abstract com.headius.invokebinder.transform.Transform.toJava.

Return a Java code representation of this transform.
public String
toString()

Implements abstract com.headius.invokebinder.transform.Transform.toString.

Return a string representation of this transform.
public MethodHandle
up(MethodHandle
the target handle
target
)

Implements abstract com.headius.invokebinder.transform.Transform.up.

Apply this transform upward from the given MethodHandle, producing a new handle.
Inherited from com.headius.invokebinder.transform.Transform:
buildClassArgumentbuildClassArgumentsbuildClassCastbuildPrimitiveJavagenerateMethodType

Field Detail

sourceback to summary
private final MethodType source
spreadTypesback to summary
private final Class<?>[] spreadTypes

Constructor Detail

Spreadback to summary
public Spread(MethodType source, Class<?>... spreadTypes)

Method Detail

downback to summary
public MethodType down(MethodType type)

Implements abstract com.headius.invokebinder.transform.Transform.down.

Doc from com.headius.invokebinder.transform.Transform.down.

Apply this transform downward from an incoming MethodType, producing a new type.

Parameters
type:MethodType

the source type

Returns:MethodType

the new type

toJavaback to summary
public String toJava(MethodType incoming)

Implements abstract com.headius.invokebinder.transform.Transform.toJava.

Doc from com.headius.invokebinder.transform.Transform.toJava.

Return a Java code representation of this transform.

Returns:String

a Java code representation of this transform.

toStringback to summary
public String toString()

Implements abstract com.headius.invokebinder.transform.Transform.toString.

Doc from com.headius.invokebinder.transform.Transform.toString.

Return a string representation of this transform.

Returns:String

a string representation of this transform

upback to summary
public MethodHandle up(MethodHandle target)

Implements abstract com.headius.invokebinder.transform.Transform.up.

Doc from com.headius.invokebinder.transform.Transform.up.

Apply this transform upward from the given MethodHandle, producing a new handle.

Parameters
target:MethodHandle

the target handle

Returns:MethodHandle

the adapted handle