MethodHandles.ReflectAs(Class, 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.
Performs an unchecked "crack" of a <a href="MethodHandleInfo.
[Android.Runtime.Register("reflectAs", "(Ljava/lang/Class;Ljava/lang/invoke/MethodHandle;)Ljava/lang/reflect/Member;", "", ApiSince=26)]
[Java.Interop.JavaTypeParameters(new System.String[] { "T extends java.lang.reflect.Member" })]
public static Java.Lang.Object? ReflectAs (Java.Lang.Class? expected, Java.Lang.Invoke.MethodHandle? target);
[<Android.Runtime.Register("reflectAs", "(Ljava/lang/Class;Ljava/lang/invoke/MethodHandle;)Ljava/lang/reflect/Member;", "", ApiSince=26)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T extends java.lang.reflect.Member" })>]
static member ReflectAs : Java.Lang.Class * Java.Lang.Invoke.MethodHandle -> Java.Lang.Object
Parameters
- expected
- Class
a class object representing the desired result type T
- target
- MethodHandle
a direct method handle to crack into symbolic reference components
Returns
a reference to the method, constructor, or field object
- 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.