|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--freemarker.ext.beans.MethodModel
A class that will wrap a reflected method call into a
TemplateMethodModel2
interface. It can be used directly, and is
heavily used by ObjectModel
to wrap reflected method calls.
Constructor Summary | |
MethodModel(java.lang.Object object,
java.lang.reflect.Method method)
Creates a model for a specific method on a specific object. |
Method Summary | |
TemplateModel |
exec(java.util.List arguments)
Invokes the method, passing it the arguments from the list. |
boolean |
isEmpty()
Returns true if the wrapped method's return type is
void. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MethodModel(java.lang.Object object, java.lang.reflect.Method method)
object
- the object to call the method on. Can be
null
for static methods.method
- the method that will be invoked.Method Detail |
public TemplateModel exec(java.util.List arguments) throws TemplateModelException
exec
in interface TemplateMethodModel2
freemarker.template.TemplateMethodModel2
arguments
- a List
of TemplateModel
objects
containing the values of the arguments passed to the method.TemplateModel
produced by the method, or null
.public boolean isEmpty()
true
if the wrapped method's return type is
void.
- Specified by:
isEmpty
in interface TemplateModel
- Following copied from interface:
freemarker.template.TemplateModel
- Returns:
true
if this object is empty, otherwise false
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |