All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.landoop.jdbc4.IWrapper.kt Maven / Gradle / Ivy

package com.landoop.jdbc4

import java.sql.SQLException

interface IWrapper {
  fun _isWrapperFor(iface: Class<*>?): Boolean = iface?.isInstance(iface) ?: false
  fun  _unwrap(iface: Class): T {
    try {
      return iface.cast(this)
    } catch (cce: ClassCastException) {
      throw SQLException("Unable to unwrap instance as " + iface.toString())
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy