@Nullable
    private ResolvableType resolveVariable(TypeVariable<?> variable) {
        if (this.type instanceof TypeVariable) {
            return resolveType().resolveVariable(variable);
        }
        if (this.type instanceof ParameterizedType) {
            ParameterizedType parameterizedType = (ParameterizedType) this.type;
            Class<?> resolveD = resolve();
            if (resolveD == null) {
                return null;
            }
            TypeVariable<?>[] variables = resolveD.getTypeParameters();
            for (int i = 0; i < variables.length; i++) {
                if (ObjectUtils.nullSafeEquals(variables[i].getName(), variable.getName())) {
                    Type actualType = parameterizedType.getActualTypeArguments()[i];
                    return forType(actualType, this.variableResolver);
                }
            }
            Type ownerType = parameterizedType.getOwnerType();
            if (ownerType != null) {
                return forType(ownerType, this.variableResolver).resolveVariable(variable);
            }
        }
        if (this.type instanceof WildcardType) {
            ResolvableType resolveD = resolveType().resolveVariable(variable);
            if (resolveD != null) {
                return resolveD;
            }
        }
        if (this.variableResolver != null) {
            return this.variableResolver.resolveVariable(variable);
        }
        return null;
    }
Resolve this type by a single level, returning the resolved value or {link #NONE}.
<p>Note: The returned {link ResolvableType} should only be used as an intermediary
as it cannot be serialized.
analyzer/src/main/java/nl/basjes/parse/useragent/utils/springframework/core/ResolvableType.java