com.vaadin.flow.templatemodel.
Class TemplateModelUtil
- java.lang.Object
-
- com.vaadin.flow.templatemodel.TemplateModelUtil
-
@Deprecated public final class TemplateModelUtil extends Object
Deprecated.This functionality is internal and bound to template model which is not supported for lit template. Polymer template support is deprecated - we recommend you to useLitTemplate
instead. Read more details from the Vaadin blog.Utility class for mapping Bean values to
TemplateModel
values.For internal use only. May be renamed or removed in a future release.
Since:
1.0
Author:
Vaadin Ltd
-
-
Method Summary
All Methods Modifier and Type Method Description static Predicate<String>
getFilterFromIncludeExclude(Method method)
Deprecated.
Gets a filter based on any
@Include
and/or@Exclude
annotations present on the given method.static <R> R
resolveBeanAndRun(TemplateModel model, String modelPath, BiFunction<BeanModelType<?>,ElementPropertyMap,R> callback)
Deprecated.
Resolves a bean model type and model map based on a model instance and passes those values to the provided callback.
static <R> R
resolveListAndRun(TemplateModel model, String modelPath, BiFunction<ListModelType<?>,ModelList,R> callback)
Deprecated.
Resolves a list model type and a model list based on a model instance and passes those to the provided callback.
-
-
-
Method Detail
-
resolveBeanAndRun
public static <R> R resolveBeanAndRun(TemplateModel model, String modelPath, BiFunction<BeanModelType<?>,ElementPropertyMap,R> callback)
Deprecated.Resolves a bean model type and model map based on a model instance and passes those values to the provided callback.
Type Parameters:
R
- the return typeParameters:
model
- the model instance for which to resolve a type and a map, notnull
modelPath
- the model path to resolve, notnull
callback
- the callback to run with the resolved bean type and the model map, notnull
Returns:
the value returned by the callback
-
resolveListAndRun
public static <R> R resolveListAndRun(TemplateModel model, String modelPath, BiFunction<ListModelType<?>,ModelList,R> callback)
Deprecated.Resolves a list model type and a model list based on a model instance and passes those to the provided callback.
Type Parameters:
R
- the return typeParameters:
model
- the model instance for which to resolve a type and a list, notnull
modelPath
- the model path to resolve, notnull
callback
- the callback to run with the resolved list type and model list, notnull
Returns:
the value returned by the callback
-
-