Class FragmentSignatureUtils
- java.lang.Object
-
- org.thymeleaf.standard.expression.FragmentSignatureUtils
-
public final class FragmentSignatureUtils extends java.lang.Object- Since:
- 2.1.0
-
-
Field Summary
Fields Modifier and Type Field Description private static charFRAGMENT_SIGNATURE_PARAMETERS_ENDprivate static charFRAGMENT_SIGNATURE_PARAMETERS_START
-
Constructor Summary
Constructors Modifier Constructor Description privateFragmentSignatureUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static java.lang.StringgetSyntheticParameterNameForIndex(int i)(package private) static FragmentSignatureinternalParseFragmentSignature(java.lang.String input)static FragmentSignatureparseFragmentSignature(IEngineConfiguration configuration, java.lang.String input)static java.util.Map<java.lang.String,java.lang.Object>processParameters(FragmentSignature fragmentSignature, java.util.Map<java.lang.String,java.lang.Object> specifiedParameters, boolean parametersAreSynthetic)Processes a set of parameters that have been specified for a fragment signature.
-
-
-
Field Detail
-
FRAGMENT_SIGNATURE_PARAMETERS_START
private static final char FRAGMENT_SIGNATURE_PARAMETERS_START
- See Also:
- Constant Field Values
-
FRAGMENT_SIGNATURE_PARAMETERS_END
private static final char FRAGMENT_SIGNATURE_PARAMETERS_END
- See Also:
- Constant Field Values
-
-
Method Detail
-
parseFragmentSignature
public static FragmentSignature parseFragmentSignature(IEngineConfiguration configuration, java.lang.String input)
-
internalParseFragmentSignature
static FragmentSignature internalParseFragmentSignature(java.lang.String input)
-
processParameters
public static java.util.Map<java.lang.String,java.lang.Object> processParameters(FragmentSignature fragmentSignature, java.util.Map<java.lang.String,java.lang.Object> specifiedParameters, boolean parametersAreSynthetic)
Processes a set of parameters that have been specified for a fragment signature.
This processing matches the specified parameters against the ones in the signature, allowing the specified ones (usually coming from a fragment selection like
th:include) to be nameless, so that their values are matched to their corresponding variable name during this parameter processing operation.The resulting processed parameters are typically applied as local variables to the nodes of a selected fragment.
- Parameters:
fragmentSignature- the signature parameters should be processed againstspecifiedParameters- the set of specified parametersparametersAreSynthetic- whether the parameter names in the specifiedParameters map are synthetic or not- Returns:
- the processed set of parameters, ready to be applied as local variables to the fragment's nodes.
-
getSyntheticParameterNameForIndex
static java.lang.String getSyntheticParameterNameForIndex(int i)
-
-