isWrapperFor(Class<?> iface)

Syntax:

boolean isWrapperFor(Class<?> iface)
                     throws SQLException

Description:

Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does. Returns false otherwise. If this implements the interface then return true, else if this is a wrapper then return the result of recursively calling isWrapperFor on the wrapped object. If this does not implement the interface and is not a wrapper, return false. This method should be implemented as a low-cost operation compared to unwrap so that callers can use this method to avoid expensive unwrap calls that may fail. If this method returns true then calling unwrap with the same argument should succeed.

Parameters:

iface

a Class defining an interface.

Returns:

true if this implements the interface or directly or indirectly wraps an object that does.

Throws:

SQLException - if a database access error occurs

Reference:

For more information, reference JDBC documentation for: Wrapper.isWrapperFor(Class<?>)