Search in sources :

Example 11 with TemplateModelIterator

use of freemarker.template.TemplateModelIterator in project freemarker by apache.

the class RmiDebugModelImpl method getCollection.

public DebugModel[] getCollection() throws TemplateModelException, RemoteException {
    List list = new ArrayList();
    TemplateModelIterator i = ((TemplateCollectionModel) model).iterator();
    while (i.hasNext()) {
        list.add(getDebugModel(i.next()));
    }
    return (DebugModel[]) list.toArray(new DebugModel[list.size()]);
}
Also used : DebugModel(freemarker.debug.DebugModel) TemplateModelIterator(freemarker.template.TemplateModelIterator) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) TemplateCollectionModel(freemarker.template.TemplateCollectionModel)

Aggregations

TemplateModelIterator (freemarker.template.TemplateModelIterator)11 TemplateHashModelEx (freemarker.template.TemplateHashModelEx)6 TemplateModel (freemarker.template.TemplateModel)4 TemplateModelException (freemarker.template.TemplateModelException)4 ArrayList (java.util.ArrayList)4 TemplateCollectionModel (freemarker.template.TemplateCollectionModel)2 TemplateScalarModel (freemarker.template.TemplateScalarModel)2 List (java.util.List)2 Set (java.util.Set)2 ImmutableListMultimap (com.google.common.collect.ImmutableListMultimap)1 ImmutableMap (com.google.common.collect.ImmutableMap)1 CollectionAndSequence (freemarker.core.CollectionAndSequence)1 DebugModel (freemarker.debug.DebugModel)1 SimpleNumber (freemarker.template.SimpleNumber)1 SimpleSequence (freemarker.template.SimpleSequence)1 TemplateSequenceModel (freemarker.template.TemplateSequenceModel)1 BigInteger (java.math.BigInteger)1 LinkedHashMap (java.util.LinkedHashMap)1 HttpEntity (org.apache.http.HttpEntity)1 NameValuePair (org.apache.http.NameValuePair)1