public final class TemplateModelUtil extends Object
TemplateModel
values.
For internal use only. May be renamed or removed in a future release.
Modifier and Type | Method and Description |
---|---|
static Predicate<String> |
getFilterFromIncludeExclude(Method method)
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)
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)
Resolves a list model type and a model list based on a model instance and
passes those to the provided callback.
|
public static <R> R resolveBeanAndRun(TemplateModel model, String modelPath, BiFunction<BeanModelType<?>,ElementPropertyMap,R> callback)
R
- the return typemodel
- the model instance for which to resolve a type and a map, not
null
modelPath
- the model path to resolve, not null
callback
- the callback to run with the resolved bean type and the model
map, not null
public static <R> R resolveListAndRun(TemplateModel model, String modelPath, BiFunction<ListModelType<?>,ModelList,R> callback)
R
- the return typemodel
- the model instance for which to resolve a type and a list, not
null
modelPath
- the model path to resolve, not null
callback
- the callback to run with the resolved list type and model
list, not null
Copyright © 2025. All rights reserved.