Class StandardExpressionObjectFactory

Object
org.thymeleaf.standard.expression.StandardExpressionObjectFactory
All Implemented Interfaces:
IExpressionObjectFactory

public class StandardExpressionObjectFactory extends Object implements IExpressionObjectFactory

Builds the expression objects to be used by Standard dialects.

Since:
3.0.0
Author:
Daniel Fernández
  • Field Details

  • Constructor Details

    • StandardExpressionObjectFactory

      public StandardExpressionObjectFactory()
  • Method Details

    • getAllExpressionObjectNames

      public Set<String> getAllExpressionObjectNames()
      Description copied from interface: IExpressionObjectFactory

      Return the complete list of expression objects that can be created by this factory.

      This list will be used for determining if a factory might actually be asked to build an object, so it should contain all possible objects to be built by the factory.

      Specified by:
      getAllExpressionObjectNames in interface IExpressionObjectFactory
      Returns:
      the list of objects this factory can build.
    • isCacheable

      public boolean isCacheable(String expressionObjectName)
      Description copied from interface: IExpressionObjectFactory

      Returns whether a specific expression object can be cached and reused for all expressions in the same template execution or not.

      Note this cacheable flag refers only to reuse of the object in expressions in expressions executed during a single template execution.

      Specified by:
      isCacheable in interface IExpressionObjectFactory
      Parameters:
      expressionObjectName - the name of the expression object.
      Returns:
      true is the object is to be considered cacheable, false if not.
    • buildObject

      public Object buildObject(IExpressionContext context, String expressionObjectName)
      Description copied from interface: IExpressionObjectFactory

      Build the requested object.

      Specified by:
      buildObject in interface IExpressionObjectFactory
      Parameters:
      context - the context being used for processing the template.
      expressionObjectName - the name of the expression object to be built.
      Returns:
      the built object, or null if the object could not be built.