Class ElementMerger
- java.lang.Object
-
- nz.net.ultraq.thymeleaf.layoutdialect.models.ElementMerger
-
- All Implemented Interfaces:
ModelMerger
public class ElementMerger extends Object implements ModelMerger
Merges an element and all its children into an existing element.- Author:
- zhanhb, Emanuel Rabina
-
-
Constructor Summary
Constructors Constructor Description ElementMerger(ITemplateContext context)
Constructor, sets up the element merger context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ITemplateContext
getContext()
IModel
merge(IModel targetModel, IModel sourceModel)
Replace the content of the target element, with the content of the source element.
-
-
-
Constructor Detail
-
ElementMerger
public ElementMerger(ITemplateContext context)
Constructor, sets up the element merger context.- Parameters:
context
-
-
-
Method Detail
-
merge
public IModel merge(IModel targetModel, IModel sourceModel)
Replace the content of the target element, with the content of the source element.- Specified by:
merge
in interfaceModelMerger
- Parameters:
targetModel
-sourceModel
-- Returns:
- Model that is the result of the merge.
-
getContext
public final ITemplateContext getContext()
-
-