freemarker.ext.beans
public final class SimpleMethodModel extends Object implements TemplateMethodModelEx, TemplateSequenceModel
TemplateMethodModel
interface.
It is used by BeanModel
to wrap reflected method calls
for non-overloaded methods.NOTHING
public Object exec(List arguments) throws TemplateModelException
exec
in interface TemplateMethodModel
exec
in interface TemplateMethodModelEx
arguments
- a List of TemplateModel
objects
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 the DeepUnwrap
class to easily obtain them.TemplateModel
, it will be automatically
wrapped using the environment
object wrapper
.TemplateModelException
public TemplateModel get(int index) throws TemplateModelException
TemplateSequenceModel
get
in interface TemplateSequenceModel
null
if
the index is out of bounds. Note that a null
value is
interpreted by FreeMarker as "variable does not exist", and accessing
a missing variables is usually considered as an error in the FreeMarker
Template Language, so the usage of a bad index will not remain hidden.TemplateModelException
public int size() throws TemplateModelException
size
in interface TemplateSequenceModel
TemplateModelException
protected Member getMember()