public final class DataSourceUnwrapper
extends java.lang.Object
DataSource
that may have been proxied or wrapped in a custom
Wrapper
such as DelegatingDataSource
.Modifier and Type | Method and Description |
---|---|
static <T> T |
unwrap(javax.sql.DataSource dataSource,
java.lang.Class<T> target)
Return an object that implements the given
target type, unwrapping delegate
or proxy if necessary. |
public static <T> T unwrap(javax.sql.DataSource dataSource, java.lang.Class<T> target)
target
type, unwrapping delegate
or proxy if necessary.T
- the target typedataSource
- the datasource to handletarget
- the type that the result must implementnull