Class GenericTypeResolver


  • public abstract class GenericTypeResolver
    extends Object
    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.

    • Constructor Detail

      • GenericTypeResolver

        public GenericTypeResolver()
    • Method Detail

      • resolveTypeArguments

        public static 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.
        Parameters:
        clazz - the target class to check against
        genericIfc - 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