class SpringVersionSpecificUtils {


    private static final Logger LOG = LoggerFactory.getLogger(SpringVersionSpecificUtils.class);

    private static final String PACKAGE_NAME = SpringVersionSpecificUtils.class.getPackage().getName();
    // Spring Security 5 requires at least Spring 5
    private static final String SPRING5_DELEGATE_CLASS = PACKAGE_NAME + ".Spring5VersionSpecificUtility";


    private static final ISpringVersionSpecificUtility spring5Delegate;



    static {

        if (SpringVersionUtils.isSpring50AtLeast() && ! SpringVersionUtils.isSpring60AtLeast()) {

            LOG.trace("[THYMELEAF][TESTING] Spring 5.x+ found on classpath. Initializing version-specific utilities for Spring 5");

            try {
                final Class<?> implClass = ClassLoaderUtils.loadClass(SPRING5_DELEGATE_CLASS);
                spring5Delegate = (ISpringVersionSpecificUtility) implClass.getDeclaredConstructor().newInstance();
            } catch (final Exception e) {
                throw new ExceptionInInitializerError(
                        new ConfigurationException(
                            "Environment has been detected to be at least Spring 5, but thymeleaf could not initialize a " +
                            "delegate of class \"" + SPRING5_DELEGATE_CLASS + "\"", e));
            }

        } else {

            throw new ExceptionInInitializerError(
                    new ConfigurationException(
                        "The Spring-version-specific infrastructure could not create utility for the specific " +
                        "version of Spring being used. Currently only Spring 5.x is supported."));

        }

    }




    public static EvaluationContext wrapEvaluationContext(
            final EvaluationContext evaluationContext, final IExpressionObjects expresionObjects) {<FILL_FUNCTION_BODY>}




    public static boolean isWebContext(final IContext context) {

        if (spring5Delegate != null) {
            return spring5Delegate.isWebContext(context);
        }

        throw new ConfigurationException(
                "The authorization infrastructure could not create initializer for the specific version of Spring being" +
                "used. Currently only Spring 5.x is supported.");

    }


    public static boolean isWebMvcContext(final IContext context) {

        if (spring5Delegate != null) {
            return spring5Delegate.isWebMvcContext(context);
        }

        throw new ConfigurationException(
                "The authorization infrastructure could not create initializer for the specific version of Spring being" +
                "used. Currently only Spring 5.x is supported.");

    }


    public static boolean isWebFluxContext(final IContext context) {

        if (spring5Delegate != null) {
            return spring5Delegate.isWebFluxContext(context);
        }

        throw new ConfigurationException(
                "The authorization infrastructure could not create initializer for the specific version of Spring being" +
                "used. Currently only Spring 5.x is supported.");

    }




    public static HttpServletRequest getHttpServletRequest(final IContext context) {

        if (spring5Delegate != null) {
            return spring5Delegate.getHttpServletRequest(context);
        }

        throw new ConfigurationException(
                "The authorization infrastructure could not create initializer for the specific version of Spring being" +
                "used. Currently only Spring 5.x or newer is supported.");

    }




    public static HttpServletResponse getHttpServletResponse(final IContext context) {

        if (spring5Delegate != null) {
            return spring5Delegate.getHttpServletResponse(context);
        }

        throw new ConfigurationException(
                "The authorization infrastructure could not create initializer for the specific version of Spring being" +
                "used. Currently only Spring 5.x or newer is supported.");

    }




    public static ServerWebExchange getServerWebExchange(final IContext context) {

        if (spring5Delegate != null) {
            return spring5Delegate.getServerWebExchange(context);
        }

        throw new ConfigurationException(
                "The authorization infrastructure could not create initializer for the specific version of Spring being" +
                "used. Currently only Spring 5.x or newer is supported.");

    }



    private SpringVersionSpecificUtils() {
        super();
    }


    
}


        if (spring5Delegate != null) {
            return spring5Delegate.wrapEvaluationContext(evaluationContext, expresionObjects);
        }

        throw new ConfigurationException(
                "The authorization infrastructure could not create initializer for the specific version of Spring being" +
                "used. Currently only Spring 5.x is supported.");

    
<no_super_class>