Class StandardSerializers

Object
org.thymeleaf.standard.serializer.StandardSerializers

public final class StandardSerializers extends Object

Utility class for the easy obtention of objects relevant to the serialization of output values in template modes like JavaScript and/or CSS.

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

    • STANDARD_JAVASCRIPT_SERIALIZER_ATTRIBUTE_NAME

      public static final String STANDARD_JAVASCRIPT_SERIALIZER_ATTRIBUTE_NAME
      Name used for registering the Standard JavaScript Serializer object as an execution attribute at the Standard Dialects.
      See Also:
    • STANDARD_CSS_SERIALIZER_ATTRIBUTE_NAME

      public static final String STANDARD_CSS_SERIALIZER_ATTRIBUTE_NAME
      Name used for registering the Standard CSS Serializer object as an execution attribute at the Standard Dialects.
      See Also:
  • Method Details

    • getJavaScriptSerializer

      public static IStandardJavaScriptSerializer getJavaScriptSerializer(IEngineConfiguration configuration)

      Obtain the JavaScript serializer (implementation of IStandardJavaScriptSerializer) registered by the Standard Dialect that is being currently used.

      Parameters:
      configuration - the configuration object for the current template execution environment.
      Returns:
      the parser object.
    • getCSSSerializer

      public static IStandardCSSSerializer getCSSSerializer(IEngineConfiguration configuration)

      Obtain the CSS serializer (implementation of IStandardCSSSerializer) registered by the Standard Dialect that is being currently used.

      Parameters:
      configuration - the configuration object for the current template execution environment.
      Returns:
      the variable expression evaluator object.