freemarker.template.instruction
Class EmptyInstruction

java.lang.Object
  |
  +--freemarker.template.instruction.EmptyInstruction
All Implemented Interfaces:
Instruction, TemplateProcessor
Direct Known Subclasses:
AssignInstruction, CallInstruction, 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,v 1.13 2003/11/10 10:01:21 run2000 Exp $

Fields inherited from interface freemarker.template.instruction.Instruction
BREAK, CASE, COMMENT_END, COMPRESS_END, DEFAULT, ELSE, ELSEIF, FOREACH_END, FUNCTION_END, IF_END, LIST_END, NONE, NOPARSE_END, SWITCH_END, TRANSFORM_END
 
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.
 int 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 int 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