public final class DataSourceUnwrapper extends Object
DataSource that may have been proxied or wrapped in a custom
 Wrapper such as DelegatingDataSource.| Modifier and Type | Method and Description | 
|---|---|
| static <I,T extends I> | unwrap(DataSource dataSource,
      Class<I> unwrapInterface,
      Class<T> target)Return an object that implements the given  targettype, unwrapping delegate
 or proxy if necessary using the specifiedunwrapInterface. | 
| static <T> T | unwrap(DataSource dataSource,
      Class<T> target)Return an object that implements the given  targettype, unwrapping delegate
 or proxy if necessary. | 
public static <I,T extends I> T unwrap(DataSource dataSource, Class<I> unwrapInterface, Class<T> target)
target type, unwrapping delegate
 or proxy if necessary using the specified unwrapInterface.I - the interface that the target type must implementT - the target typedataSource - the datasource to handleunwrapInterface - the interface that the target type must implementtarget - the type that the result must implementnullWrapper.unwrap(Class)public static <T> T unwrap(DataSource dataSource, Class<T> target)
target type, unwrapping delegate
 or proxy if necessary. Consider using unwrap(DataSource, Class, Class) as
 unwrapping won't be considered if target is
 not an interface.T - the target typedataSource - the datasource to handletarget - the type that the result must implementnull