Page History
...
Method | Description |
---|---|
def AbstractThread getThread(Instruction) def AbstractThread getThread(Statement) | Returns the SCL thread of a SCL statement or SCL instruction instruction. |
def AbstractThread getMainThread(Instruction) def AbstractThread getMainThread(Statement) | Returns the main thread of a SCL program program. |
def boolean isInSameThreadAs(Instruction, Instruction) def boolean isInSameThreadAs(Statement, Statement) | Returns true, if both instructions/statements are in the same thread. |
def boolean isInMainThread(Instruction) def boolean isInMainThread(Statement) | Returns true, if the instruction/statement runs in the main thread. |
def boolean isInThread(Instruction, ThreadAbstractThread) def boolean isInThread(Statement, ThreadAbstractThread) | Returns true, if the instruction/statement runs in the given thread. |
def boolean contains(ThreadAbstractThread, Instruction) def boolean contains(ThreadAbstractThread, Statements) | Returns true, if the thread contains the given instruction/statement. |
def dropPrevious(ThreadAbstractThread, Statement) def dropPrevious(List<Statement>, Statement) | Drops all preceeding statements in a thread or a list of statements until the given statement is reached. |
SCL Goto Extensions
...
To help with the handling of the goto statement and its target instruction, use the SCL Goto Extensions.
Method | Description |
---|---|
def Statement getTargetStatement(Goto) def Statement getTargetStatement(Goto, AbstractThread) | Returns the target statement of a goto instruction (in the context of the (given) thread). |
def boolean targetExists(Goto) def boolean targetExists(Goto, AbstractThread) | Returns true, if the target of a goto instruction exists (in the context of the (given) thread). |
def InstructionStatement getInstructionStatement(Statement) | Returns the first valid InstructionStatement in a thread after the given statement. May return null, if no further InstructionStatement exists. To get a valid instruction form a goto jump, one can write "goto.getTargetStatement?.getInstructionStatement?.instruction". The result value will be the instruction or null. |
def getIncomingGotos(Statement) | Returns a list of all gotos that target the given statement. If you want to retrieve the count of incoming goto jumps, use "getIncomingGotos.size". |
SCL Expression Extensions
...