freemarker.template.instruction
Interface Instruction

All Known Subinterfaces:
UnparsedInstruction
All Known Implementing Classes:
AssignBlockInstruction, AssignInstruction, BreakInstruction, CallInstruction, CaseInstruction, CommentInstruction, DefaultCaseInstruction, ElseInstruction, EmptyInstruction, EndInstruction, ExitInstruction, FunctionInstruction, GenericStartInstruction, IfElseInstruction, IfInstruction, IncludeInstruction, ListInstruction, LocalInstruction, NOOPInstruction, NoParseInstruction, SwitchInstruction, TextBlockInstruction, TransformInstruction, VariableInstruction

public interface Instruction

An interface that parsed instructions must implement.

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

Nested Class Summary
static class Instruction.EndType
          Enumerates the type of end instructions that can terminate a given instruction.
 
Method Summary
 TemplateProcessor callBuilder(TemplateBuilder builder)
          A TemplateBuilder can call this method to have an Instruction call it back to be built.
 Instruction.EndType getEndType()
          Retrieve the type of end instruction, if any.
 boolean isEndInstruction()
          Is this an end instruction?
 

Method Detail

isEndInstruction

boolean isEndInstruction()
Is this an end instruction?

Returns:
true if this instruction marks the end of a statement, otherwise false

getEndType

Instruction.EndType getEndType()
Retrieve the type of end instruction, if any.

Returns:
the type of this instruction if it is an end instruction, otherwise NONE.

callBuilder

TemplateProcessor callBuilder(TemplateBuilder builder)
                              throws ParseException
A TemplateBuilder can call this method to have an Instruction call it back to be built. The Instruction will call the appropriate TemplateBuilder.buildStatement() method for its subclass, passing back a reference to itself. This approach is intended to make type-checking of Instruction objects unnecessary.

Parameters:
builder - the builder to be called back by this method
Throws:
ParseException