|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object freemarker.ext.beans2.EnumerationMethodWrapper
public class EnumerationMethodWrapper
Wraps a method that returns an enumeration. The enumeration is then wrapped in an EnumerationWrapper.
Constructor Summary | |
---|---|
EnumerationMethodWrapper()
Default constructor where an enumeration method is not provided initially. |
|
EnumerationMethodWrapper(java.lang.reflect.Method method,
java.lang.Object[] paramValues)
Constructor that takes a method and object parameters to be provided to the method call. |
|
EnumerationMethodWrapper(java.lang.reflect.Method method,
java.lang.Object[] paramValues,
java.lang.Object object)
Constructor that takes a method, the object target for the method, and object parameters to be provided to the method call. |
Method Summary | |
---|---|
boolean |
isEmpty()
Is the object empty? |
void |
releaseIterator(TemplateIteratorModel iterator)
Returns the used iterator to the list model. |
void |
setMethod(java.lang.reflect.Method method)
Sets the method to be called by this enumeration method wrapper. |
void |
setObject(java.lang.Object object)
Sets the object target for the method to be called. |
void |
setParamValues(java.lang.Object[] paramValues)
Sets the object values to be passed as parameters to the method call. |
TemplateIteratorModel |
templateIterator()
Retrieves an iterator to iterate over this list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EnumerationMethodWrapper()
public EnumerationMethodWrapper(java.lang.reflect.Method method, java.lang.Object[] paramValues)
method
- the Method to be calledparamValues
- parameters to be supplied to the methodpublic EnumerationMethodWrapper(java.lang.reflect.Method method, java.lang.Object[] paramValues, java.lang.Object object)
method
- the Method to be calledparamValues
- parameters to be supplied to the methodobject
- the object that is the target of the methodMethod Detail |
---|
public void setObject(java.lang.Object object)
object
- the object target for the methodpublic void setMethod(java.lang.reflect.Method method)
method
- the method to be calledpublic void setParamValues(java.lang.Object[] paramValues)
paramValues
- the values to be passed to the methodpublic boolean isEmpty() throws TemplateModelException
TemplateModel
isEmpty
in interface TemplateModel
true
if this object is empty, otherwise false
TemplateModelException
public TemplateIteratorModel templateIterator() throws TemplateModelException
null
if there are no elements in the list.
templateIterator
in interface TemplateListModel2
TemplateModelException
- the next item in the list can't be
retrieved, or no next item exists.public void releaseIterator(TemplateIteratorModel iterator)
Returns the used iterator to the list model. Implement this method
when you want to use an object pool of TemplateIterator
objects.
Otherwise, leave the implementation of this method blank.
Note that if the iterator returned in templateIterator()
is
null
, this method will not be called for the
null
iterator.
releaseIterator
in interface TemplateListModel2
iterator
- the iterator to be returned to the object pool, if any
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |