public abstract class ProgramBlock extends Object implements ParseInfo
| Modifier and Type | Field and Description |
|---|---|
int |
_beginColumn |
int |
_beginLine |
int |
_endColumn |
int |
_endLine |
String |
_filename |
String |
_text |
static String |
PRED_VAR |
| Constructor and Description |
|---|
ProgramBlock(Program prog) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
execute(ExecutionContext ec)
Executes this program block (incl recompilation if required).
|
ScalarObject |
executePredicate(ArrayList<Instruction> inst,
Hop hops,
boolean requiresRecompile,
Types.ValueType retType,
ExecutionContext ec)
Executes given predicate instructions (incl recompilation if required)
|
int |
getBeginColumn() |
int |
getBeginLine() |
abstract ArrayList<ProgramBlock> |
getChildBlocks()
Get the list of child program blocks if nested;
otherwise this method returns null.
|
int |
getEndColumn() |
int |
getEndLine() |
Instruction |
getExitInstruction() |
String |
getFilename() |
Program |
getProgram() |
StatementBlock |
getStatementBlock() |
String |
getText() |
long |
getThreadID() |
boolean |
hasThreadID() |
abstract boolean |
isNested()
Indicates if the program block is nested, i.e.,
if it contains other program blocks (e.g., loops).
|
static boolean |
isThreadID(long tid) |
String |
printBlockErrorLocation() |
void |
setBeginColumn(int passed) |
void |
setBeginLine(int passed) |
void |
setEndColumn(int passed) |
void |
setEndLine(int passed) |
void |
setExitInstruction(Instruction rmVar) |
void |
setFilename(String passed) |
void |
setParseInfo(ParseInfo parseInfo)
Set parse information.
|
void |
setProgram(Program prog) |
void |
setStatementBlock(StatementBlock sb) |
void |
setText(String text) |
void |
setThreadID(long id) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitctxAndFilenameToParseInfopublic static final String PRED_VAR
public String _filename
public int _beginLine
public int _beginColumn
public int _endLine
public int _endColumn
public String _text
public ProgramBlock(Program prog)
public Program getProgram()
public void setProgram(Program prog)
public StatementBlock getStatementBlock()
public void setStatementBlock(StatementBlock sb)
public void setThreadID(long id)
public boolean hasThreadID()
public static boolean isThreadID(long tid)
public long getThreadID()
public void setExitInstruction(Instruction rmVar)
public Instruction getExitInstruction()
public abstract ArrayList<ProgramBlock> getChildBlocks()
public abstract boolean isNested()
public abstract void execute(ExecutionContext ec)
ec - execution contextpublic ScalarObject executePredicate(ArrayList<Instruction> inst, Hop hops, boolean requiresRecompile, Types.ValueType retType, ExecutionContext ec)
inst - list of instructionshops - high-level operatorrequiresRecompile - true if requires recompileretType - value type of the return typeec - execution contextpublic void setFilename(String passed)
setFilename in interface ParseInfopublic void setBeginLine(int passed)
setBeginLine in interface ParseInfopublic void setBeginColumn(int passed)
setBeginColumn in interface ParseInfopublic void setEndLine(int passed)
setEndLine in interface ParseInfopublic void setEndColumn(int passed)
setEndColumn in interface ParseInfopublic String getFilename()
getFilename in interface ParseInfopublic int getBeginLine()
getBeginLine in interface ParseInfopublic int getBeginColumn()
getBeginColumn in interface ParseInfopublic int getEndLine()
getEndLine in interface ParseInfopublic int getEndColumn()
getEndColumn in interface ParseInfopublic String printBlockErrorLocation()
public void setParseInfo(ParseInfo parseInfo)
parseInfo - parse information, such as beginning line position, beginning
column position, ending line position, ending column position,
text, and filenameCopyright © 2020 The Apache Software Foundation. All rights reserved.