static ResolvableType forType(
        @Nullable Type type, @Nullable TypeProvider typeProvider, @Nullable VariableResolver variableResolver) {

        if (type == null && typeProvider != null) {
            type = SerializableTypeWrapper.forTypeProvider(typeProvider);
        }
        if (type == null) {
            return NONE;
        }

        // For simple Class references, build the wrapper right away -
        // no expensive resolution necessary, so not worth caching...
        if (type instanceof Class) {
            return new ResolvableType(type, typeProvider, variableResolver, (ResolvableType) null);
        }

        // Purge empty entries on access since we don't have a clean-up thread or the like.
        CACHE.purgeUnreferencedEntries();

        // Check the cache - we may have a ResolvableType which has been resolved before...
        ResolvableType resultType = new ResolvableType(type, typeProvider, variableResolver);
        ResolvableType cachedType = CACHE.get(resultType);
        if (cachedType == null) {
            cachedType = new ResolvableType(type, typeProvider, variableResolver, resultType.hash);
            CACHE.put(cachedType, cachedType);
        }
        resultType.resolved = cachedType.resolved;
        return resultType;
    }
Return a {link ResolvableType} for the specified {link Type} backed by a given
{link VariableResolver}.

@param type             the source type or {@code null}
@param typeProvider     the type provider or {@code null}
@param variableResolver the variable resolver or {@code null}
@return a {link ResolvableType} for the specified {link Type} and {link VariableResolver}
analyzer/src/main/java/nl/basjes/parse/useragent/utils/springframework/core/ResolvableType.java