freemarker.ext.beans2
Class StaticEnumWrapper<T extends java.lang.Enum>

java.lang.Object
  extended by freemarker.ext.beans2.StaticClassWrapper<T>
      extended by freemarker.ext.beans2.StaticEnumWrapper<T>
All Implemented Interfaces:
TemplateHashModel, TemplateListModel2, TemplateModel, TemplateScalarModel, TemplateWriteableHashModel, java.io.Serializable

public class StaticEnumWrapper<T extends java.lang.Enum>
extends StaticClassWrapper<T>
implements TemplateListModel2

Since:
1.9
Version:
$Id: StaticEnumWrapper.java 1109 2005-09-09 11:21:12Z run2000 $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class freemarker.ext.beans2.StaticClassWrapper
clazz
 
Constructor Summary
StaticEnumWrapper()
           
StaticEnumWrapper(java.lang.Class<T> clazz)
           
 
Method Summary
 void releaseIterator(TemplateIteratorModel iterator)
          Returns the used iterator to the enumeration.
 TemplateIteratorModel templateIterator()
          Retrieves an iterator to iterate over this enumeration.
 
Methods inherited from class freemarker.ext.beans2.StaticClassWrapper
get, getAsString, getClazz, isEmpty, put, setClazz
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface freemarker.template.TemplateModel
isEmpty
 

Constructor Detail

StaticEnumWrapper

public StaticEnumWrapper()

StaticEnumWrapper

public StaticEnumWrapper(java.lang.Class<T> clazz)
Method Detail

templateIterator

public TemplateIteratorModel templateIterator()
                                       throws TemplateModelException
Retrieves an iterator to iterate over this enumeration.

Specified by:
templateIterator in interface TemplateListModel2
Returns:
an iterator to iterate over the current enumeration.
Throws:
TemplateModelException - the next item in the list can't be retrieved, or no next item exists.

releaseIterator

public void releaseIterator(TemplateIteratorModel iterator)

Returns the used iterator to the enumeration.

Specified by:
releaseIterator in interface TemplateListModel2
Parameters:
iterator - the iterator to be returned