Class GenericTypeResolver
java.lang.Object
nl.basjes.parse.useragent.utils.springframework.core.GenericTypeResolver
Helper class for resolving generic types against type variables.
Mainly intended for usage within the framework, resolving method parameter types even when they are declared generically.
- Since:
- 2.5.2
- Author:
- Juergen Hoeller, Rob Harrop, Sam Brannen, Phillip Webb
-
Method Summary
Modifier and TypeMethodDescriptionstatic Class<?>[]
resolveTypeArguments
(Class<?> clazz, Class<?> genericIfc) Resolve the type arguments of the given generic interface against the given target class which is assumed to implement the generic interface and possibly declare concrete types for its type variables.
-
Method Details
-
resolveTypeArguments
Resolve the type arguments of the given generic interface against the given target class which is assumed to implement the generic interface and possibly declare concrete types for its type variables.- Parameters:
clazz
- the target class to check againstgenericIfc
- the generic interface or superclass to resolve the type argument from- Returns:
- the resolved type of each argument, with the array size matching the
number of actual type arguments, or
null
if not resolvable
-