freemarker.template.instruction
Class GenericStartInstruction
java.lang.Object
freemarker.template.instruction.GenericStartInstruction
- All Implemented Interfaces:
- ContainerInstruction, Instruction, TemplateProcessor, java.io.Serializable
- Direct Known Subclasses:
- AssignBlockInstruction, FunctionInstruction, ListInstruction, LocalInstruction, TransformInstruction
public abstract class GenericStartInstruction
- extends java.lang.Object
- implements Instruction, TemplateProcessor, ContainerInstruction, java.io.Serializable
A superclass for instructions that have a body and a single end instruction,
and that can produce output.
- Version:
- $Id: GenericStartInstruction.java 1101 2013-04-01 04:17:32Z run2000 $
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
body
protected TemplateProcessor body
- The template body to be processed
GenericStartInstruction
public GenericStartInstruction()
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
setBody
public void setBody(TemplateProcessor body)
- Sets the body to be generated by this instruction.
- Parameters:
body
- the content to be generated
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(GenericStartInstruction)
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