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

io.lenses.jdbc4.IWrapper.kt Maven / Gradle / Ivy

There is a newer version: 3.0.2
Show newest version
package io.lenses.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")
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy