Class ThymeleafEvaluationContextWrapper

  • All Implemented Interfaces:
    org.springframework.expression.EvaluationContext, IThymeleafEvaluationContext

    public final class ThymeleafEvaluationContextWrapper
    extends Object
    implements IThymeleafEvaluationContext

    Implementation of Thymeleaf's IThymeleafEvaluationContext interface designed to wrap around a delegated implementation of EvaluationContext, adding the Thymeleaf-required PropertyAccessor implementations and (optionally) a series of variables to be accessed like #variableName during expression evaluation.

    Note a class with this name existed since 2.1.0, but it was completely reimplemented in Thymeleaf 3.0

    Since:
    3.0.0
    Author:
    Daniel Fernández
    • Constructor Detail

      • ThymeleafEvaluationContextWrapper

        public ThymeleafEvaluationContextWrapper​(org.springframework.expression.EvaluationContext delegate)
    • Method Detail

      • getRootObject

        public org.springframework.expression.TypedValue getRootObject()
        Specified by:
        getRootObject in interface org.springframework.expression.EvaluationContext
      • getConstructorResolvers

        public List<org.springframework.expression.ConstructorResolver> getConstructorResolvers()
        Specified by:
        getConstructorResolvers in interface org.springframework.expression.EvaluationContext
      • getMethodResolvers

        public List<org.springframework.expression.MethodResolver> getMethodResolvers()
        Specified by:
        getMethodResolvers in interface org.springframework.expression.EvaluationContext
      • getPropertyAccessors

        public List<org.springframework.expression.PropertyAccessor> getPropertyAccessors()
        Specified by:
        getPropertyAccessors in interface org.springframework.expression.EvaluationContext
      • getTypeLocator

        public org.springframework.expression.TypeLocator getTypeLocator()
        Specified by:
        getTypeLocator in interface org.springframework.expression.EvaluationContext
      • getTypeConverter

        public org.springframework.expression.TypeConverter getTypeConverter()
        Specified by:
        getTypeConverter in interface org.springframework.expression.EvaluationContext
      • getTypeComparator

        public org.springframework.expression.TypeComparator getTypeComparator()
        Specified by:
        getTypeComparator in interface org.springframework.expression.EvaluationContext
      • getOperatorOverloader

        public org.springframework.expression.OperatorOverloader getOperatorOverloader()
        Specified by:
        getOperatorOverloader in interface org.springframework.expression.EvaluationContext
      • getBeanResolver

        public org.springframework.expression.BeanResolver getBeanResolver()
        Specified by:
        getBeanResolver in interface org.springframework.expression.EvaluationContext
      • setVariable

        public void setVariable​(String name,
                                Object value)
        Specified by:
        setVariable in interface org.springframework.expression.EvaluationContext
      • lookupVariable

        public Object lookupVariable​(String name)
        Specified by:
        lookupVariable in interface org.springframework.expression.EvaluationContext