|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object freemarker.ext.beans.MethodModel
freemarker.ext.beans2
package
public final class 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)
Deprecated. Creates a model for a specific method on a specific object. |
Method Summary | |
---|---|
TemplateModel |
exec(java.util.List<TemplateModel> arguments)
Deprecated. Invokes the method, passing it the arguments from the list. |
boolean |
isEmpty()
Deprecated. 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<TemplateModel> arguments) throws TemplateModelException
exec
in interface TemplateMethodModel2
arguments
- a List
of TemplateModel
objects
containing the values of the arguments passed to the method.
TemplateModel
produced by the method, or null
.
TemplateModelException
public boolean isEmpty()
true
if the wrapped method's return type is
void.
- Specified by:
isEmpty
in interface TemplateModel
- Returns:
true
if this object is empty, otherwise false
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |