|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfreemarker.ext.beans2.IteratorMethodWrapper
public class IteratorMethodWrapper
Wraps an iterator method.
Field Summary | |
---|---|
protected java.lang.reflect.Method |
method
|
protected java.lang.Object |
object
|
protected java.lang.Object[] |
paramValues
|
Constructor Summary | |
---|---|
IteratorMethodWrapper()
|
|
IteratorMethodWrapper(java.lang.reflect.Method method,
java.lang.Object[] paramValues)
|
|
IteratorMethodWrapper(java.lang.reflect.Method method,
java.lang.Object[] paramValues,
java.lang.Object object)
|
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)
|
void |
setObject(java.lang.Object object)
|
void |
setParamValues(java.lang.Object[] paramValues)
|
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 |
Field Detail |
---|
protected java.lang.Object object
protected java.lang.reflect.Method method
protected java.lang.Object[] paramValues
Constructor Detail |
---|
public IteratorMethodWrapper()
public IteratorMethodWrapper(java.lang.reflect.Method method, java.lang.Object[] paramValues)
public IteratorMethodWrapper(java.lang.reflect.Method method, java.lang.Object[] paramValues, java.lang.Object object)
Method Detail |
---|
public void setObject(java.lang.Object object)
public void setMethod(java.lang.reflect.Method method)
public void setParamValues(java.lang.Object[] paramValues)
public 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 |