Package freemarker.template
Interface TemplateMethodModelEx
-
- All Superinterfaces:
TemplateMethodModel,TemplateModel
public interface TemplateMethodModelEx extends TemplateMethodModel
A subinterface ofTemplateMethodModelthat acts on models, rather than on strings.TemplateMethodModelinterface will receive string representations of its argument expressions, while this interface receives the models themselves. The interface has no new methods. Instead, by implementing this interface the class declares that it wishes to receive actual TemplateModel instances in its arguments list when invoked instead of their string representations. Further, if the implementation wishes to operate on POJOs that might be underlying the models, it can use the static utility methods in theDeepUnwrapclass to easily obtain them.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface freemarker.template.TemplateModel
TemplateModel.InvalidExpressionModel, TemplateModel.JavaNull
-
-
Field Summary
-
Fields inherited from interface freemarker.template.TemplateModel
INVALID_EXPRESSION, JAVA_NULL, NOTHING
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Objectexec(List arguments)Executes a method call.
-
-
-
Method Detail
-
exec
Object exec(List arguments) throws TemplateModelException
Executes a method call.- Specified by:
execin interfaceTemplateMethodModel- Parameters:
arguments- a List ofTemplateModelobjects containing the values of the arguments passed to the method. If the implementation wishes to operate on POJOs that might be underlying the models, it can use the static utility methods in theDeepUnwrapclass to easily obtain them.- Returns:
- the return value of the method, or null. If the returned value
does not implement
TemplateModel, it will be automatically wrapped using theenvironment object wrapper. - Throws:
TemplateModelException
-
-