|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object freemarker.template.instruction.NOOPInstruction
public final class NOOPInstruction
An instruction that does nothing. This is useful when we want to substitute
one instruction for another. The best example of this is the way
LinkedListTemplateBuilder
deals with
FunctionInstruction
s.
Note:
NOOPInstruction
is a singleton instance. Use the
getInstance()
method to retrieve instances of this instruction.
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 |
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. |
static NOOPInstruction |
getInstance()
Retrieves a singleton instance of NOOPInstruction . |
boolean |
isEndInstruction()
Is this an end instruction? |
TemplateProcessor.ExitStatus |
process(TemplateProcessorParameters p)
Processes the contents of this TemplateProcessor and
outputs the resulting text to a Writer . |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static NOOPInstruction getInstance()
NOOPInstruction
.
NOOPInstruction
public boolean isEndInstruction()
isEndInstruction
in interface Instruction
false
, indicating that this is not an end instructionpublic Instruction.EndType getEndType()
getEndType
in interface Instruction
NONE
, indicating that this is not an end instructionpublic TemplateProcessor callBuilder(TemplateBuilder builder)
TemplateBuilder
can call
this method to have an Instruction
call it back to be built.
This implementation returns immediately, since there is nothing additional
to be parsed within this instruction.
callBuilder
in interface Instruction
builder
- the builder to be called back by this methodpublic TemplateProcessor.ExitStatus process(TemplateProcessorParameters p)
TemplateProcessor
and
outputs the resulting text to a Writer
. This
implementation returns immediately, since there is nothing to output.
process
in interface TemplateProcessor
p
- template processing parameters
public java.lang.String toString()
toString
in class java.lang.Object
String
"NOOP
"
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |