public interface TemplateMethodModelEx extends TemplateMethodModel
BeansWrapper, but you can implement this interface to create top-level functions too. They are "extended" compared to the deprecated
TemplateMethodModel, which could only accept string parameters.
In templates they are used like
myMethod(1, "foo") or
java.lang.Object exec(java.util.List arguments) throws TemplateModelException
TemplateModel-s, containing the arguments passed to the method. If the implementation absolutely wants to operate on POJOs, it can use the static utility methods in the
DeepUnwrapclass to easily obtain them. However, unwrapping is not always possible (or not perfectly), and isn't always efficient, so it's recommended to use the original
TemplateModelvalue as much as possible.
null. If the returned value does not implement
TemplateModel, it will be automatically wrapped using the
environment's object wrapper.