Compartir a través de


IWrapper.Unwrap(Class) Method

Definition

Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.

[Android.Runtime.Register("unwrap", "(Ljava/lang/Class;)Ljava/lang/Object;", "GetUnwrap_Ljava_lang_Class_Handler:Java.Sql.IWrapperInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public Java.Lang.Object? Unwrap (Java.Lang.Class? iface);
[<Android.Runtime.Register("unwrap", "(Ljava/lang/Class;)Ljava/lang/Object;", "GetUnwrap_Ljava_lang_Class_Handler:Java.Sql.IWrapperInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
abstract member Unwrap : Java.Lang.Class -> Java.Lang.Object

Parameters

iface
Class

A Class defining an interface that the result must implement.

Returns

an object that implements the interface. May be a proxy for the actual implementing object.

Attributes

Remarks

Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.

If the receiver implements the interface then the result is the receiver or a proxy for the receiver. If the receiver is a wrapper and the wrapped object implements the interface then the result is the wrapped object or a proxy for the wrapped object. Otherwise return the the result of calling unwrap recursively on the wrapped object or a proxy for that result. If the receiver is not a wrapper and does not implement the interface, then an SQLException is thrown.

Added in 1.6.

Java documentation for java.sql.Wrapper.unwrap(java.lang.Class<T>).

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