Class ViewElementModelWriterRegistry
java.lang.Object
com.foreach.across.modules.web.ui.thymeleaf.ViewElementModelWriterRegistry
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetModelWriter
(@NonNull ViewElement viewElement) Finds the most appropriateViewElementModelWriter
: first attempts to find a writer registered to that specific class, second looks for the element type.void
registerModelWriter
(Class<? extends ViewElement> viewElementClass, ViewElementModelWriter builder) void
registerModelWriter
(String viewElementType, ViewElementModelWriter builder)
-
Constructor Details
-
ViewElementModelWriterRegistry
public ViewElementModelWriterRegistry()
-
-
Method Details
-
registerModelWriter
public void registerModelWriter(Class<? extends ViewElement> viewElementClass, ViewElementModelWriter builder) -
registerModelWriter
-
getModelWriter
public ViewElementModelWriter<ViewElement> getModelWriter(@NonNull @NonNull ViewElement viewElement) Finds the most appropriateViewElementModelWriter
: first attempts to find a writer registered to that specific class, second looks for the element type.- Parameters:
viewElement
- instance for which to find a builder- Returns:
- builder instance or null if none found
-