Class PoolImplUtils
java.lang.Object
org.datanucleus.store.rdbms.datasource.dbcp2.pool2.impl.PoolImplUtils
Implementation specific utilities.
- Since:
- 2.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static Class
<?> getFactoryType
(Class<? extends PooledObjectFactory> factoryClass) Identifies the concrete type of object that an object factory creates.private static <T> Object
getGenericType
(Class<T> type, Class<? extends T> clazz) Obtains the concrete type used by an implementation of an interface that uses a generic type.private static <T> ParameterizedType
getParameterizedType
(Class<T> type, Class<? extends T> clazz) Gets the matching parameterized type or null.private static Object
getTypeParameter
(Class<?> clazz, Type argType) For a generic parameter, return either the Class used or if the type is unknown, the index for the type in definition of the class
-
Constructor Details
-
PoolImplUtils
PoolImplUtils()
-
-
Method Details
-
getFactoryType
Identifies the concrete type of object that an object factory creates.- Parameters:
factoryClass
- The factory to examine- Returns:
- the type of object the factory creates
-
getGenericType
Obtains the concrete type used by an implementation of an interface that uses a generic type.- Type Parameters:
T
- The interface type- Parameters:
type
- The interface that defines a generic typeclazz
- The class that implements the interface with a concrete type- Returns:
- concrete type used by the implementation
-
getParameterizedType
Gets the matching parameterized type or null.- Type Parameters:
T
- The interface type.- Parameters:
type
- The interface that defines a generic type.clazz
- The class that implements the interface with a concrete type.- Returns:
- the matching parameterized type or null.
-
getTypeParameter
For a generic parameter, return either the Class used or if the type is unknown, the index for the type in definition of the class
-