|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.slamd.scripting.engine.Instruction
com.sun.slamd.scripting.engine.IfNotInstruction
This class defines an instruction that will be executed if the associated condition is false. It may also define an instruction that will be executed if the associated condition is not false.
| Constructor Summary | |
IfNotInstruction(int lineNumber,
Argument condition,
Instruction ifNotInstruction)
Creates a new ifnot instruction with no else clause. |
|
IfNotInstruction(int lineNumber,
Argument condition,
Instruction ifNotInstruction,
Instruction elseInstruction)
Creates a new ifnot instruction with an optional else clause. |
|
| Method Summary | |
void |
debugExecute(JobClass jobThread)
Performs the function associated with this instruction, writing debug information about its execution to the client's message writer using the writeVerbose method. |
void |
execute(JobClass jobThread)
Performs the function associated with this instruction. |
Argument |
getCondition()
Retrieves the condition that will be evaluated at runtime to determine whether the primary instruction is executed. |
Instruction |
getInstructionIfFalse()
Retrieves the instruction that will be executed if the condition evaluates to false. |
Instruction |
getInstructionIfTrue()
Retrieves the instruction that will be executed if the condition evaluates to true. |
java.lang.String |
toString(int indent)
Retrieves a string representation of this instruction as could be found in a script file. |
| Methods inherited from class com.sun.slamd.scripting.engine.Instruction |
getLineNumber, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public IfNotInstruction(int lineNumber,
Argument condition,
Instruction ifNotInstruction)
lineNumber - The line number on which the ifnot statement
occurs in the script.condition - The condition that will be evaluated to determine
whether the primary instruction is executed.ifNotInstruction - The primary instruction to execute if the
condition is false.
public IfNotInstruction(int lineNumber,
Argument condition,
Instruction ifNotInstruction,
Instruction elseInstruction)
lineNumber - The line number on which the ifnot statement
occurs in the script.condition - The condition that will be evaluated to determine
whether the primary instruction is executed.ifNotInstruction - The primary instruction to execute if the
condition is false.elseInstruction - The optional instruction to execute if the
condition is false.| Method Detail |
public Argument getCondition()
public Instruction getInstructionIfTrue()
null if no such instruction has been
defined.public Instruction getInstructionIfFalse()
public void execute(JobClass jobThread)
throws ScriptException
execute in class InstructionjobThread - The job thread that will be executing the script.
ScriptException - If a problem occurs while processing this
instruction.
public void debugExecute(JobClass jobThread)
throws ScriptException
writeVerbose method.
debugExecute in class InstructionjobThread - The job thread that will be executing the script.
ScriptException - If a problem occurs while processing this
instruction.public java.lang.String toString(int indent)
toString in class Instructionindent - The number of spaces to indent the output.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||