freemarker.template.instruction
Class EmptyInstruction

java.lang.Object
  extended by freemarker.template.instruction.EmptyInstruction
All Implemented Interfaces:
Instruction, TemplateProcessor
Direct Known Subclasses:
AssignInstruction, BreakInstruction, CallInstruction, ExitInstruction, IncludeInstruction, VariableInstruction

public abstract class EmptyInstruction
extends java.lang.Object
implements Instruction, TemplateProcessor

A superclass for Instructions that have no associated EndInstruction.

Version:
$Id: EmptyInstruction.java 1101 2013-04-01 04:17:32Z run2000 $

Nested Class Summary
 
Nested classes/interfaces inherited from interface freemarker.template.instruction.Instruction
Instruction.EndType
 
Nested classes/interfaces inherited from interface freemarker.template.TemplateProcessor
TemplateProcessor.ExitStatus
 
Constructor Summary
EmptyInstruction()
          Default constructor.
 
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()
          Determine what type of end instruction this is, if any.
 boolean isEndInstruction()
          Is this an end instruction?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface freemarker.template.TemplateProcessor
process
 

Constructor Detail

EmptyInstruction

public EmptyInstruction()
Default constructor.

Method Detail

isEndInstruction

public boolean isEndInstruction()
Is this an end instruction?

Specified by:
isEndInstruction in interface Instruction
Returns:
false, indicating that this is not an end instruction

getEndType

public Instruction.EndType getEndType()
Determine what type of end instruction this is, if any.

Specified by:
getEndType in interface Instruction
Returns:
NONE, indicating that this is not an end instruction

callBuilder

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

Specified by:
callBuilder in interface Instruction
Parameters:
builder - the builder to be called back by this method
Throws:
ParseException