Package java.sql

Interface Wrapper

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      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.
      <T> T unwrap​(Class<T> iface)
      Returns an object that implements the given interface.
    • Method Detail

      • unwrap

        <T> T unwrap​(Class<T> iface)
              throws SQLException
        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
      • isWrapperFor

        boolean isWrapperFor​(Class<?> iface)
                      throws SQLException
        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