Class StandardSerializers
Object
org.thymeleaf.standard.serializer.StandardSerializers
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Name used for registering the Standard CSS Serializer object as an execution attribute at the Standard Dialects.static final String
Name used for registering the Standard JavaScript Serializer object as an execution attribute at the Standard Dialects. -
Method Summary
Modifier and TypeMethodDescriptionstatic IStandardCSSSerializer
getCSSSerializer
(IEngineConfiguration configuration) Obtain the CSS serializer (implementation ofIStandardCSSSerializer
) registered by the Standard Dialect that is being currently used.getJavaScriptSerializer
(IEngineConfiguration configuration) Obtain the JavaScript serializer (implementation ofIStandardJavaScriptSerializer
) registered by the Standard Dialect that is being currently used.
-
Field Details
-
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
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
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.
-