Class VariableDeclarationMerger
- java.lang.Object
-
- nz.net.ultraq.thymeleaf.layoutdialect.models.VariableDeclarationMerger
-
public class VariableDeclarationMerger extends Object
Merges variable declarations in ath:withattribute processor, taking the declarations in the target and combining them with the declarations in the source, overriding any same-named declarations in the target.- Author:
- zhanhb, Emanuel Rabina
-
-
Constructor Summary
Constructors Constructor Description VariableDeclarationMerger(IExpressionContext context)Constructor, sets the processing context for the merger.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IExpressionContextgetContext()Stringmerge(String target, String source)Mergeth:withattributes so that names from the source value overwrite the same names in the target value.
-
-
-
Constructor Detail
-
VariableDeclarationMerger
public VariableDeclarationMerger(IExpressionContext context)
Constructor, sets the processing context for the merger.- Parameters:
context-
-
-
Method Detail
-
merge
public String merge(String target, String source)
Mergeth:withattributes so that names from the source value overwrite the same names in the target value.- Parameters:
target-source-- Returns:
-
getContext
public final IExpressionContext getContext()
-
-