freemarker.template.compiler
Class TemplateArrayList

java.lang.Object
  extended by freemarker.template.compiler.TemplateArrayList
All Implemented Interfaces:
TemplateProcessor, java.io.Serializable

public final class TemplateArrayList
extends java.lang.Object
implements TemplateProcessor, java.io.Serializable

Encapsulates an array of TemplateProcessor objects. At run time, the contents of each item are processed in order.

Version:
$Id: TemplateArrayList.java 1162 2013-04-20 12:04:32Z run2000 $
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface freemarker.template.TemplateProcessor
TemplateProcessor.ExitStatus
 
Constructor Summary
TemplateArrayList(java.util.List<TemplateProcessor> processorList)
          Create a new TemplateArrayList, given a list of TemplateProcessors to build the internal data structure.
 
Method Summary
 TemplateProcessor.ExitStatus process(TemplateProcessorParameters p)
          Processes the contents of the internal TemplateProcessor list, and outputs the resulting text to a Writer.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TemplateArrayList

public TemplateArrayList(java.util.List<TemplateProcessor> processorList)
Create a new TemplateArrayList, given a list of TemplateProcessors to build the internal data structure.

Parameters:
processorList - a List of TemplateProcessor objects to be added to the internal list.
Throws:
java.lang.NullPointerException - processorList is null
Method Detail

process

public TemplateProcessor.ExitStatus process(TemplateProcessorParameters p)
                                     throws java.io.IOException
Processes the contents of the internal TemplateProcessor list, and outputs the resulting text to a Writer.

Specified by:
process in interface TemplateProcessor
Parameters:
p - template processing parameters
Returns:
an exit code indicating how the process terminated, typically used for short-circuiting template processing
Throws:
java.io.IOException - an IO error occurred during processing

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of the object