public static Type[] resolveSuperArguments(Type[] parameters, Class childClass, Type[] childParameters)
    {
        Map<TypeVariable, Type> typeMapping;
        if (childParameters != null) {
            TypeVariable<Class>[] declaredChildParameters = childClass.getTypeParameters();

            typeMapping = new HashMap<TypeVariable, Type>();
            for (int i = 0; i < declaredChildParameters.length; ++i) {
                typeMapping.put(declaredChildParameters[i], childParameters[i]);
            }
        } else {
            typeMapping = Collections.emptyMap();
        }

        return resolveTypes(parameters, typeMapping);
    }
public static Type [ ] resolveSuperArguments ( Type [ ] parameters , Class childClass , Type [ ] childParameters ) { Map < TypeVariable , Type > typeMapping ; if ( childParameters != null ) { TypeVariable < Class > [ ] declaredChildParameters = childClass . getTypeParameters ( ) ; typeMapping = new HashMap < TypeVariable , Type > ( ) ; for ( int i = 0 ; i < declaredChildParameters . length ; ++ i ) { typeMapping . put ( declaredChildParameters [ i ] , childParameters [ i ] ) ; } } else { typeMapping = Collections . emptyMap ( ) ; } return resolveTypes ( parameters , typeMapping ) ; }
@param parameters the parameters of a direct superclass or interface
@param childClass an extending class
@param childParameters the actual parameters of the extending class
@return the actual parameters of the direct superclass or interface, return null if it's impossible to resolve