|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.template.instruction.DefaultCaseInstruction
public class DefaultCaseInstruction
Represents a case in a switch statement. Unexpectedly, this is a superclass
for the regular CaseInstruction class.
CaseInstruction,
SwitchInstruction,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface freemarker.template.TemplateProcessor |
|---|
TemplateProcessor.ExitStatus |
| Nested classes/interfaces inherited from interface freemarker.template.instruction.Instruction |
|---|
Instruction.EndType |
| Field Summary | |
|---|---|
protected TemplateProcessor |
body
The template body to process if the default case is reached. |
| Constructor Summary | |
|---|---|
DefaultCaseInstruction()
Default constructor. |
|
| 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. |
Expression |
getExpression()
Retrieves the Expression to be
evaluated when the case instruction is encountered. |
boolean |
isDefault()
Is this the default case? |
boolean |
isEndInstruction()
Is this an end instruction? |
TemplateProcessor.ExitStatus |
process(TemplateProcessorParameters p)
Process this <default> instruction. |
void |
setBody(TemplateProcessor body)
Sets the body to be processed if the case expression evaluated to true. |
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 |
| Field Detail |
|---|
protected TemplateProcessor body
| Constructor Detail |
|---|
public DefaultCaseInstruction()
| Method Detail |
|---|
public Expression getExpression()
Expression to be
evaluated when the case instruction is encountered.
Expression associated with this
CaseInstructionpublic boolean isDefault()
true if this is the default case,
otherwise falsepublic final void setBody(TemplateProcessor body)
true.
body - the TemplateProcessor to be processed if this
Case passes the test.public final boolean isEndInstruction()
isEndInstruction in interface Instructiontrue, to indicate this is an end instructionpublic Instruction.EndType getEndType()
getEndType in interface InstructionDEFAULTpublic final TemplateProcessor callBuilder(TemplateBuilder builder)
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.
callBuilder in interface Instructionbuilder - the builder to be called back by this method
public final TemplateProcessor.ExitStatus process(TemplateProcessorParameters p)
throws java.io.IOException
<default> instruction.
process in interface TemplateProcessorp - template processing parameters
java.io.IOException - an IO error occurred during processingpublic java.lang.String toString()
toString in class java.lang.ObjectString representing this instruction subtree
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||