Home » freemarker-2.3.13 » freemarker.ext.beans » [javadoc | source]
public class: ArrayModel [javadoc | source]

All Implemented Interfaces:
    TemplateSequenceModel, TemplateCollectionModel, AdapterTemplateModel, WrapperTemplateModel, TemplateHashModelEx

A class that will wrap an arbitrary array into TemplateCollectionModel and TemplateSequenceModel interfaces. It supports element retrieval through the array[index] syntax and can be iterated as a list.

Field Summary
static final  ModelFactory FACTORY     
Fields inherited from freemarker.ext.beans.BeanModel:
object,  wrapper,  FACTORY
 public ArrayModel(Object array,
    BeansWrapper wrapper) 
    Creates a new model that wraps the specified array object.
    array - the array object to wrap into a model.
    wrapper - the BeansWrapper associated with this model. Every model has to have an associated BeansWrapper instance. The model gains many attributes from its wrapper, including the caching behavior, method exposure level, method-over-item shadowing policy etc.
    IllegalArgumentException - if the passed object is not a Java array.
Method from freemarker.ext.beans.ArrayModel Summary:
get,   isEmpty,   iterator,   size
Methods from freemarker.ext.beans.BeanModel:
get,   getAdaptedObject,   getWrappedObject,   hasPlainGetMethod,   invokeGenericGet,   isEmpty,   keySet,   keys,   size,   toString,   unwrap,   values,   wrap
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from freemarker.ext.beans.ArrayModel Detail:
 public TemplateModel get(int index) throws TemplateModelException 
 public boolean isEmpty() 
 public TemplateModelIterator iterator() 
 public int size()