Condividi tramite


IMethodHandleInfo.ReflectAs(Class, MethodHandles+Lookup) Method

Definition

Reflects the underlying member as a method, constructor, or field object.

[Android.Runtime.Register("reflectAs", "(Ljava/lang/Class;Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/reflect/Member;", "GetReflectAs_Ljava_lang_Class_Ljava_lang_invoke_MethodHandles_Lookup_Handler:Java.Lang.Invoke.IMethodHandleInfoInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
[Java.Interop.JavaTypeParameters(new System.String[] { "T extends java.lang.reflect.Member" })]
public Java.Lang.Object? ReflectAs (Java.Lang.Class? expected, Java.Lang.Invoke.MethodHandles.Lookup? lookup);
[<Android.Runtime.Register("reflectAs", "(Ljava/lang/Class;Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/reflect/Member;", "GetReflectAs_Ljava_lang_Class_Ljava_lang_invoke_MethodHandles_Lookup_Handler:Java.Lang.Invoke.IMethodHandleInfoInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T extends java.lang.reflect.Member" })>]
abstract member ReflectAs : Java.Lang.Class * Java.Lang.Invoke.MethodHandles.Lookup -> Java.Lang.Object

Parameters

expected
Class

a class object representing the desired result type T

lookup
MethodHandles.Lookup

the lookup object that created this MethodHandleInfo, or one with equivalent access privileges

Returns

a reference to the method, constructor, or field object

Attributes

Remarks

Java documentation for java.lang.invoke.MethodHandleInfo.reflectAs(java.lang.Class, java.lang.invoke.Lookup).

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