Partager via


MethodHandle.WithVarargs(Boolean) Method

Definition

Adapts this method handle to be #asVarargsCollector variable arity if the boolean flag is true, else #asFixedArity fixed arity.

[Android.Runtime.Register("withVarargs", "(Z)Ljava/lang/invoke/MethodHandle;", "GetWithVarargs_ZHandler", ApiSince=33)]
public virtual Java.Lang.Invoke.MethodHandle? WithVarargs (bool makeVarargs);
[<Android.Runtime.Register("withVarargs", "(Z)Ljava/lang/invoke/MethodHandle;", "GetWithVarargs_ZHandler", ApiSince=33)>]
abstract member WithVarargs : bool -> Java.Lang.Invoke.MethodHandle
override this.WithVarargs : bool -> Java.Lang.Invoke.MethodHandle

Parameters

makeVarargs
Boolean

true if the return method handle should have variable arity behavior

Returns

a method handle of the same type, with possibly adjusted variable arity behavior

Attributes

Remarks

Adapts this method handle to be #asVarargsCollector variable arity if the boolean flag is true, else #asFixedArity fixed arity. If the method handle is already of the proper arity mode, it is returned unchanged.

Added in 9.

Java documentation for java.lang.invoke.MethodHandle.withVarargs(boolean).

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