MethodHandles.ExplicitCastArguments(MethodHandle, MethodType) Method

Definition

Produces a method handle which adapts the type of the given method handle to a new type by pairwise argument and return type conversion.

[Android.Runtime.Register("explicitCastArguments", "(Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/MethodHandle;", "", ApiSince=26)]
public static Java.Lang.Invoke.MethodHandle? ExplicitCastArguments (Java.Lang.Invoke.MethodHandle? target, Java.Lang.Invoke.MethodType? newType);
[<Android.Runtime.Register("explicitCastArguments", "(Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/MethodHandle;", "", ApiSince=26)>]
static member ExplicitCastArguments : Java.Lang.Invoke.MethodHandle * Java.Lang.Invoke.MethodType -> Java.Lang.Invoke.MethodHandle

Parameters

target
MethodHandle

the method handle to invoke after arguments are retyped

newType
MethodType

the expected type of the new method handle

Returns

MethodHandle

a method handle which delegates to the target after performing any necessary argument conversions, and arranges for any necessary return value conversions

Attributes

Remarks

Java documentation for java.lang.invoke.MethodHandles.explicitCastArguments(java.lang.invoke.MethodHandle, java.lang.invoke.MethodType).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to