freemarker.template.instruction
Class EndInstruction
java.lang.Object
|
+--freemarker.template.instruction.EndInstruction
- All Implemented Interfaces:
- Instruction, java.io.Serializable
- public final class EndInstruction
- extends java.lang.Object
- implements Instruction, java.io.Serializable
Represents an end instruction. The particular type of end instruction
is determined by the endType
variable. Values of
endType
can be taken from the Instruction
interface.
- Version:
- $Id: EndInstruction.java,v 1.16 2003/11/27 11:36:45 run2000 Exp $
- See Also:
- Serialized Form
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EndInstruction
public EndInstruction(int endType)
- Constructor that takes one of the end types from the
Instruction
interface.
- Parameters:
endType
- the type of end instruction
isEndInstruction
public boolean isEndInstruction()
- Is this an end instruction?
- Specified by:
isEndInstruction
in interface Instruction
- Returns:
true
, to indicate this is an end instruction
getEndType
public int getEndType()
- Return the end type that this instruction represents.
- Specified by:
getEndType
in interface Instruction
- Returns:
- the type of this end instruction
callBuilder
public TemplateProcessor callBuilder(TemplateBuilder builder)
- A
TemplateBuilder
can call
this method to have an Instruction
call it back to be built.
For end instructions, there is nothing more to be build, so return
immediately.
- Specified by:
callBuilder
in interface Instruction
- Parameters:
builder
- the builder to be called back by this method
toString
public java.lang.String toString()
- Returns a string representation of the object.
- Overrides:
toString
in class java.lang.Object
- Returns:
- a
String
representation of the object.