|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.ext.beans2.BeanWrapper<T>
freemarker.ext.beans2.MapWrapper<T>
public class MapWrapper<T extends java.util.Map>
Wraps Collection objects by providing additional methods to support list models and method support for getting and setting values.
| Field Summary |
|---|
| Fields inherited from class freemarker.ext.beans2.BeanWrapper |
|---|
emptyParams, object |
| Constructor Summary | |
|---|---|
MapWrapper()
Default constructor where an object is not provided initially. |
|
MapWrapper(T object)
Constructor that takes a Map object to be wrapped. |
|
| Method Summary | |
|---|---|
TemplateModel |
exec(java.util.List<TemplateModel> arguments)
Executes a method call. |
void |
releaseIterator(TemplateIteratorModel iterator)
Returns the used iterator to the list model. |
TemplateIteratorModel |
templateIterator()
Retrieves an iterator to iterate over this Map. |
| Methods inherited from class freemarker.ext.beans2.BeanWrapper |
|---|
clone, get, getAsObject, getAsString, isEmpty, put, setObject |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface freemarker.template.TemplateModel |
|---|
isEmpty |
| Constructor Detail |
|---|
public MapWrapper()
public MapWrapper(T object)
object - the map object to be wrapped| Method Detail |
|---|
public TemplateModel exec(java.util.List<TemplateModel> arguments)
throws TemplateModelException
List of
TemplateModel objects.
exec in interface TemplateMethodModel2arguments - a List of TemplateModel objects
containing the values of the arguments passed to the method.
TemplateModel produced by the method, or null.
TemplateModelException
public TemplateIteratorModel templateIterator()
throws TemplateModelException
templateIterator in interface TemplateListModel2TemplateModelException - 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 TemplateListModel2iterator - 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 | ||||||||