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,v 1.12 2003/11/03 03:33:32 run2000 Exp $

Method Summary
 TemplateProcessor build()
          Builds a new template.
 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(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(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

public TemplateProcessor build()
                        throws ParseException
Builds a new template.
Returns:
a TemplateProcessor representing the compiled form of the template.

buildStatement

public 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.

buildStatement

public 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.

buildStatement

public 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.

buildStatement

public 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.

buildStatement

public 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.

buildStatement

public 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.