freemarker.template.compiler
Class LinkedListTemplateBuilder
java.lang.Object
|
+--freemarker.template.compiler.LinkedListTemplateBuilder
- All Implemented Interfaces:
- TemplateBuilder
- public final class LinkedListTemplateBuilder
- extends java.lang.Object
- implements TemplateBuilder
Builds a template as a tree structure in which child nodes
are stored in TemplateArrayList
s. Each instance can be used to
compile one template.
This class is now misnamed,since it originally build a
TemplateLinkedList
.
- Version:
- $Id: LinkedListTemplateBuilder.java,v 1.22 2003/11/10 03:55:37 run2000 Exp $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LinkedListTemplateBuilder
public LinkedListTemplateBuilder(FunctionTemplateProcessor template,
TemplateParser parser)
- Constructs a new
LinkedListTemplateBuilder
with a
FunctionTemplateProcessor
and a
TemplateParser
.
- Parameters:
template
- the template to be builtparser
- the parser to parse the input stream
build
public TemplateProcessor build()
throws ParseException
- Builds the template.
- Specified by:
build
in interface TemplateBuilder
- Returns:
- the head of the built template.
- Throws:
ParseException
- the template could not be built
buildStatement
public TemplateProcessor buildStatement(EmptyInstruction instruction)
throws ParseException
- When this
TemplateBuilder
implementation calls
Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder)
, the
Instruction
will call
this method if it is an EmptyInstruction
.
- Specified by:
buildStatement
in interface TemplateBuilder
- Parameters:
instruction
- the Instruction
on which
callBuilder()
was called.
buildStatement
public TemplateProcessor buildStatement(GenericStartInstruction instruction)
throws ParseException
- When this
TemplateBuilder
implementation calls
Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder)
, the
Instruction
will call
this method if it should be built as a
GenericStartInstruction
.
- Specified by:
buildStatement
in interface TemplateBuilder
- Parameters:
instruction
- the Instruction
on which
callBuilder()
was called.
buildStatement
public TemplateProcessor buildStatement(FunctionInstruction instruction)
throws ParseException
- When this
TemplateBuilder
implementation calls
Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder)
, the
Instruction
will call
this method if it is a FunctionInstruction
.
- Specified by:
buildStatement
in interface TemplateBuilder
- Parameters:
instruction
- the Instruction
on which
callBuilder()
was called.
buildStatement
public TemplateProcessor buildStatement(IfElseInstruction instruction)
throws ParseException
- When this
TemplateBuilder
implementation calls
Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder)
, the
Instruction
will call
this method if it is an IfInstruction
.
- Specified by:
buildStatement
in interface TemplateBuilder
- Parameters:
instruction
- the Instruction
on which
callBuilder()
was called.
buildStatement
public TemplateProcessor buildStatement(SwitchInstruction instruction)
throws ParseException
- When this
TemplateBuilder
implementation calls
Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder)
, the
Instruction
will call
this method if it is a SwitchInstruction
.
- Specified by:
buildStatement
in interface TemplateBuilder
- Parameters:
instruction
- the Instruction
on which
callBuilder()
was called.
buildStatement
public TemplateProcessor buildStatement(UnparsedInstruction instruction)
throws ParseException
- When this
TemplateBuilder
implementation calls
Instruction.callBuilder(freemarker.template.compiler.TemplateBuilder)
, the
Instruction
will call
this method if it is an UnparsedInstruction
.
- Specified by:
buildStatement
in interface TemplateBuilder
- Parameters:
instruction
- the Instruction
on which
callBuilder()
was called.