public class ForProgramBlock extends ProgramBlock
_beginColumn, _beginLine, _endColumn, _endLine, _filename, _text, PRED_VAR
Constructor and Description |
---|
ForProgramBlock(Program prog,
String iterPredVar) |
Modifier and Type | Method and Description |
---|---|
void |
addProgramBlock(ProgramBlock childBlock) |
void |
execute(ExecutionContext ec)
Executes this program block (incl recompilation if required).
|
ArrayList<ProgramBlock> |
getChildBlocks()
Get the list of child program blocks if nested;
otherwise this method returns null.
|
ArrayList<Instruction> |
getFromInstructions() |
ArrayList<Instruction> |
getIncrementInstructions() |
String |
getIterVar() |
ArrayList<Instruction> |
getToInstructions() |
boolean |
isNested()
Indicates if the program block is nested, i.e.,
if it contains other program blocks (e.g., loops).
|
String |
printBlockErrorLocation() |
void |
setChildBlocks(ArrayList<ProgramBlock> pbs) |
void |
setFromInstructions(ArrayList<Instruction> instructions) |
void |
setIncrementInstructions(ArrayList<Instruction> instructions) |
void |
setToInstructions(ArrayList<Instruction> instructions) |
executePredicate, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getExitInstruction, getFilename, getProgram, getStatementBlock, getText, getThreadID, hasThreadID, isThreadID, setBeginColumn, setBeginLine, setEndColumn, setEndLine, setExitInstruction, setFilename, setParseInfo, setProgram, setStatementBlock, setText, setThreadID
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
ctxAndFilenameToParseInfo
public ArrayList<Instruction> getFromInstructions()
public void setFromInstructions(ArrayList<Instruction> instructions)
public ArrayList<Instruction> getToInstructions()
public void setToInstructions(ArrayList<Instruction> instructions)
public ArrayList<Instruction> getIncrementInstructions()
public void setIncrementInstructions(ArrayList<Instruction> instructions)
public void addProgramBlock(ProgramBlock childBlock)
public void setChildBlocks(ArrayList<ProgramBlock> pbs)
public String getIterVar()
public ArrayList<ProgramBlock> getChildBlocks()
ProgramBlock
getChildBlocks
in class ProgramBlock
public boolean isNested()
ProgramBlock
isNested
in class ProgramBlock
public void execute(ExecutionContext ec)
ProgramBlock
execute
in class ProgramBlock
ec
- execution contextpublic String printBlockErrorLocation()
printBlockErrorLocation
in class ProgramBlock
Copyright © 2020 The Apache Software Foundation. All rights reserved.