MethodHandles.GuardWithTest(MethodHandle, MethodHandle, MethodHandle) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Makes a method handle which adapts a target method handle, by guarding it with a test, a boolean-valued method handle.
[Android.Runtime.Register("guardWithTest", "(Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodHandle;)Ljava/lang/invoke/MethodHandle;", "", ApiSince=26)]
public static Java.Lang.Invoke.MethodHandle? GuardWithTest (Java.Lang.Invoke.MethodHandle? test, Java.Lang.Invoke.MethodHandle? target, Java.Lang.Invoke.MethodHandle? fallback);
[<Android.Runtime.Register("guardWithTest", "(Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodHandle;)Ljava/lang/invoke/MethodHandle;", "", ApiSince=26)>]
static member GuardWithTest : Java.Lang.Invoke.MethodHandle * Java.Lang.Invoke.MethodHandle * Java.Lang.Invoke.MethodHandle -> Java.Lang.Invoke.MethodHandle
Parameters
- test
- MethodHandle
method handle used for test, must return boolean
- target
- MethodHandle
method handle to call if test passes
- fallback
- MethodHandle
method handle to call if test fails
Returns
method handle which incorporates the specified if/then/else logic
- Attributes
Remarks
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.