public boolean isWrapperFor(Class<?> interfaceClass) throws SQLException {
        TraceComponent tc = getTracer();
        if (tc.isEntryEnabled())
            Tr.entry(this, tc, "isWrapperFor", interfaceClass);

        boolean isWrapper;
        try {
            activate();
            isWrapper = interfaceClass.isInterface()
                        && (interfaceClass.isInstance(this)
                        || ((mcf.jdbcDriverSpecVersion >= 40 && !(this instanceof CommonDataSource)) ?
                                        ((Wrapper) WSJdbcTracer.getImpl(getJDBCImplObject())).isWrapperFor(interfaceClass) :
                                        getJDBCImplObject(interfaceClass) != null));
        } catch (SQLException sqlX) {
            FFDCFilter.processException(
                                        sqlX, getClass().getName() + ".isWrapperFor", "296", this);
            if (tc.isEntryEnabled())
                Tr.exit(this, tc, "isWrapperFor", sqlX);
            throw WSJdbcUtil.mapException(this, sqlX);
        } catch (NullPointerException nullX) {
            // No FFDC code needed; we might be closed.
            throw runtimeXIfNotClosed(nullX);
        } catch (RuntimeException runX) {
            FFDCFilter.processException(
                                        runX, getClass().getName() + ".isWrapperFor", "307", this);
            if (tc.isEntryEnabled())
                Tr.exit(this, tc, "isWrapperFor", runX);
            throw runX;
        } catch (Error err) {
            FFDCFilter.processException(
                                        err, getClass().getName() + ".isWrapperFor", "314", this);
            if (tc.isEntryEnabled())
                Tr.exit(this, tc, "isWrapperFor", err);
            throw err;
        }

        if (tc.isEntryEnabled())
            Tr.exit(this, tc, "isWrapperFor", isWrapper ? Boolean.TRUE : Boolean.FALSE);
        return isWrapper;
    }
public boolean isWrapperFor ( Class < ? > interfaceClass ) throws SQLException { TraceComponent tc = getTracer ( ) ; if ( tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "isWrapperFor" , interfaceClass ) ; boolean isWrapper ; try { activate ( ) ; isWrapper = interfaceClass . isInterface ( ) && ( interfaceClass . isInstance ( this ) || ( ( mcf . jdbcDriverSpecVersion >= 40 && ! ( this instanceof CommonDataSource ) ) ? ( ( Wrapper ) WSJdbcTracer . getImpl ( getJDBCImplObject ( ) ) ) . isWrapperFor ( interfaceClass ) : getJDBCImplObject ( interfaceClass ) != null ) ) ; } catch ( SQLException sqlX ) { FFDCFilter . processException ( sqlX , getClass ( ) . getName ( ) + ".isWrapperFor" , "296" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "isWrapperFor" , sqlX ) ; throw WSJdbcUtil . mapException ( this , sqlX ) ; } catch ( NullPointerException nullX ) { throw runtimeXIfNotClosed ( nullX ) ; } catch ( RuntimeException runX ) { FFDCFilter . processException ( runX , getClass ( ) . getName ( ) + ".isWrapperFor" , "307" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "isWrapperFor" , runX ) ; throw runX ; } catch ( Error err ) { FFDCFilter . processException ( err , getClass ( ) . getName ( ) + ".isWrapperFor" , "314" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "isWrapperFor" , err ) ; throw err ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "isWrapperFor" , isWrapper ? Boolean . TRUE : Boolean . FALSE ) ; return isWrapper ; }
Finds out if unwrap can be successfully invoked for the specified interface.

@param interfaceClass the requested interface.

@return true if unwrap can be invoked, otherwise false.
@throws SQLException if an error occurs.