freemarker.template.instruction
Class AssignBlockInstruction
java.lang.Object
freemarker.template.instruction.GenericStartInstruction
freemarker.template.instruction.AssignBlockInstruction
- All Implemented Interfaces:
- ContainerInstruction, Instruction, TemplateProcessor, java.io.Serializable
public final class AssignBlockInstruction
- extends GenericStartInstruction
- implements java.io.Serializable
An instruction that assigns a template block to a single-identifier
variable.
- Since:
- 1.9
- Version:
- $Id: AssignBlockInstruction.java 1162 2013-04-20 12:04:32Z run2000 $
- See Also:
- Serialized Form
|
Constructor Summary |
AssignBlockInstruction(Variable variable)
Constructor that takes a vairable to be assigned and the expression
whose value should be assigned. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AssignBlockInstruction
public AssignBlockInstruction(Variable variable)
- Constructor that takes a vairable to be assigned and the expression
whose value should be assigned.
- Parameters:
variable - the variable to assign to.
- Throws:
java.lang.NullPointerException - the variable or value is null
java.lang.IllegalArgumentException - attempt to assign variable to an iterator
process
public TemplateProcessor.ExitStatus process(TemplateProcessorParameters p)
throws java.io.IOException
- Process this
<assign ... > block instruction.
- Specified by:
process in interface TemplateProcessor
- Parameters:
p - template processing parameters
- Returns:
- an exit code indicating how the process terminated, typically
used for short-circuiting template processing
- Throws:
java.io.IOException - an IO error occurred during processing
testEndInstruction
public boolean testEndInstruction(Instruction endInstruction)
- Is this the right kind of instruction for the given
EndInstruction?
- Specified by:
testEndInstruction in interface ContainerInstruction
- Parameters:
endInstruction - the end instruction we're testing
- Returns:
true if the EndInstruction is a
transform end instruction, otherwise false
toString
public java.lang.String toString()
- Returns a string representation of the object.
- Overrides:
toString in class java.lang.Object
- Returns:
- a
String representing this instruction subtree