freemarker.template.compiler
Interface TemplateBuilder

All Known Implementing Classes:
LinkedListTemplateBuilder

public interface TemplateBuilder

An interface for objects that build the compiled form of a template.

Version:
$Id: TemplateBuilder.java 1107 2013-04-12 02:00:10Z run2000 $

Method Summary
 TemplateProcessor build()
          Builds a new template.
 TemplateProcessor buildStatement(BreakInstruction instruction)
          When an implementation of TemplateBuilder calls Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder), the Instruction will call this method if it is a BreakInstruction.
 TemplateProcessor buildStatement(EmptyInstruction instruction)
          When an implementation of TemplateBuilder calls Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder), the Instruction will call this method if it is an EmptyInstruction.
 TemplateProcessor buildStatement(ExitInstruction instruction)
          When an implementation of TemplateBuilder calls Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder), the Instruction will call this method if it is an ExitInstruction.
 TemplateProcessor buildStatement(FunctionInstruction instruction)
          When an implementation of TemplateBuilder calls Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder), the Instruction will call this method if it is a FunctionInstruction.
 TemplateProcessor buildStatement(GenericStartInstruction instruction)
          When an implementation of TemplateBuilder calls Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder), the Instruction will call this method if it should be built as a GenericStartInstruction.
 TemplateProcessor buildStatement(IfElseInstruction instruction)
          When an implementation of TemplateBuilder calls Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder), the Instruction will call this method if it is an IfElseInstruction.
 TemplateProcessor buildStatement(ListInstruction instruction)
          When an implementation of TemplateBuilder calls Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder), the Instruction will call this method if it is a ListInstruction.
 TemplateProcessor buildStatement(LocalInstruction instruction)
          When an implementation of TemplateBuilder calls Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder), the Instruction will call this method if it is a LocalInstruction.
 TemplateProcessor buildStatement(SwitchInstruction instruction)
          When an implementation of TemplateBuilder calls Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder), the Instruction will call this method if it is a SwitchInstruction.
 TemplateProcessor buildStatement(UnparsedInstruction instruction)
          When an implementation of TemplateBuilder calls Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder), the Instruction will call this method if it is an UnparsedInstruction.
 

Method Detail

build

TemplateProcessor build()
                        throws ParseException
Builds a new template.

Returns:
a TemplateProcessor representing the compiled form of the template.
Throws:
ParseException

buildStatement

TemplateProcessor buildStatement(EmptyInstruction instruction)
                                 throws ParseException
When an implementation of TemplateBuilder calls Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder), the Instruction will call this method if it is an EmptyInstruction.

Parameters:
instruction - the Instruction on which callBuilder() was called.
Throws:
ParseException

buildStatement

TemplateProcessor buildStatement(GenericStartInstruction instruction)
                                 throws ParseException
When an implementation of TemplateBuilder calls Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder), the Instruction will call this method if it should be built as a GenericStartInstruction.

Parameters:
instruction - the Instruction on which callBuilder() was called.
Throws:
ParseException

buildStatement

TemplateProcessor buildStatement(ListInstruction instruction)
                                 throws ParseException
When an implementation of TemplateBuilder calls Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder), the Instruction will call this method if it is a ListInstruction.

Parameters:
instruction - the Instruction on which callBuilder() was called.
Throws:
ParseException

buildStatement

TemplateProcessor buildStatement(FunctionInstruction instruction)
                                 throws ParseException
When an implementation of TemplateBuilder calls Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder), the Instruction will call this method if it is a FunctionInstruction.

Parameters:
instruction - the Instruction on which callBuilder() was called.
Throws:
ParseException

buildStatement

TemplateProcessor buildStatement(LocalInstruction instruction)
                                 throws ParseException
When an implementation of TemplateBuilder calls Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder), the Instruction will call this method if it is a LocalInstruction.

Parameters:
instruction - the Instruction on which callBuilder() was called.
Throws:
ParseException

buildStatement

TemplateProcessor buildStatement(IfElseInstruction instruction)
                                 throws ParseException
When an implementation of TemplateBuilder calls Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder), the Instruction will call this method if it is an IfElseInstruction.

Parameters:
instruction - the Instruction on which callBuilder() was called.
Throws:
ParseException

buildStatement

TemplateProcessor buildStatement(SwitchInstruction instruction)
                                 throws ParseException
When an implementation of TemplateBuilder calls Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder), the Instruction will call this method if it is a SwitchInstruction.

Parameters:
instruction - the Instruction on which callBuilder() was called.
Throws:
ParseException

buildStatement

TemplateProcessor buildStatement(UnparsedInstruction instruction)
                                 throws ParseException
When an implementation of TemplateBuilder calls Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder), the Instruction will call this method if it is an UnparsedInstruction.

Parameters:
instruction - the Instruction on which callBuilder() was called.
Throws:
ParseException

buildStatement

TemplateProcessor buildStatement(BreakInstruction instruction)
                                 throws ParseException
When an implementation of TemplateBuilder calls Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder), the Instruction will call this method if it is a BreakInstruction.

Parameters:
instruction - the Instruction on which callBuilder() was called.
Throws:
ParseException

buildStatement

TemplateProcessor buildStatement(ExitInstruction instruction)
                                 throws ParseException
When an implementation of TemplateBuilder calls Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder), the Instruction will call this method if it is an ExitInstruction.

Parameters:
instruction - the Instruction on which callBuilder() was called.
Throws:
ParseException