|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object freemarker.ext.beans2.BeanWrapper<T> freemarker.ext.beans2.PropertiesWrapper<T>
public class PropertiesWrapper<T extends java.util.Properties>
Wrapper for a Properties object. Distinct from a Map wrapper because we can assume all keys and values are String objects.
Field Summary |
---|
Fields inherited from class freemarker.ext.beans2.BeanWrapper |
---|
emptyParams, object |
Constructor Summary | |
---|---|
PropertiesWrapper()
Default constructor where an object is not provided initially. |
|
PropertiesWrapper(T object)
Constructor that takes a Properties object to be wrapped. |
Method Summary | |
---|---|
TemplateModel |
exec(java.util.List<java.lang.String> 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 Properties object. |
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 PropertiesWrapper()
public PropertiesWrapper(T object)
object
- the properties object to be wrappedMethod Detail |
---|
public TemplateModel exec(java.util.List<java.lang.String> arguments) throws TemplateModelException
List
of
TemplateModel
objects.
exec
in interface TemplateMethodModel
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 TemplateIteratorModel templateIterator() throws TemplateModelException
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 |