Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public interface

Wrapper

java.sql.Wrapper
Known Indirect Subclasses

Class Overview

This class is an actual usage of the wrapper pattern for JDBC classes. Developers can get the delegate instance when the instance may be a proxy class.

Summary

Public Methods
abstract boolean )">isWrapperFor ( Class <?> iface)
If the caller is a wrapper of the class or implements the given interface, the methods return false and vice versa.
abstract <T> T )">unwrap ( Class <T> iface)
Returns an object that implements the given interface.

Public Methods

)">

public abstract boolean isWrapperFor ( Class <?> iface)

Added in API level 9

If the caller is a wrapper of the class or implements the given interface, the methods return false and vice versa.

Parameters
iface - the class that defines the interface
Returns
  • - true if the instance implements the interface
Throws
SQLException - when an error occurs when judges the object
)">

public abstract T unwrap ( Class <T> iface)

Added in API level 9

Returns an object that implements the given interface. If the caller is not a wrapper, a SQLException will be thrown.

Parameters
iface - the class that defines the interface
Returns
  • - an object that implements the interface
Throws
SQLException - if there is no object implementing the specific interface