public class ExecutableBlock<T> extends AbstractExecutableModuleElement
Modifier and Type | Field and Description |
---|---|
protected IExecutableModuleElement |
body |
protected Class<? extends T> |
expectedResultClass |
protected String |
role |
protected String |
text |
Constructor and Description |
---|
ExecutableBlock(Class<? extends T> expectedResultClass) |
Modifier and Type | Method and Description |
---|---|
void |
build(AST cst,
IModule module) |
void |
compile(IEolCompilationContext context) |
T |
execute(IEolContext context) |
T |
execute(IEolContext context,
boolean inNewFrame,
FrameType frameType,
Variable... variables) |
T |
execute(IEolContext context,
boolean inNewFrame,
Variable... variables) |
T |
execute(IEolContext context,
Variable... variables) |
protected Object |
executeBlockOrExpressionAst(IExecutableModuleElement ast,
IEolContext context) |
Object |
executeBody(IEolContext context) |
IExecutableModuleElement |
getBody() |
protected Class<? extends T> |
getExpectedResultClass() |
String |
getRole() |
String |
getText() |
protected void |
postExecution()
Any chores to be done after execution
|
void |
setBody(IExecutableModuleElement body) |
void |
setRole(String role) |
void |
setText(String text) |
equals, getChildren, getComments, getDebugInfo, getFile, getModule, getParent, getRegion, getUri, hashCode, setModule, setParent, setRegion, setUri, toString
protected IExecutableModuleElement body
protected String role
protected String text
public void build(AST cst, IModule module)
build
in interface ModuleElement
build
in class AbstractModuleElement
public String getText()
public void setText(String text)
public IExecutableModuleElement getBody()
public void setBody(IExecutableModuleElement body)
public String getRole()
public void setRole(String role)
public T execute(IEolContext context, Variable... variables) throws EolRuntimeException
EolRuntimeException
public T execute(IEolContext context) throws EolRuntimeException
EolRuntimeException
protected Object executeBlockOrExpressionAst(IExecutableModuleElement ast, IEolContext context) throws EolRuntimeException
EolRuntimeException
public T execute(IEolContext context, boolean inNewFrame, FrameType frameType, Variable... variables) throws EolRuntimeException
EolRuntimeException
protected void postExecution()
public Object executeBody(IEolContext context) throws EolRuntimeException
context
- EolRuntimeException
public T execute(IEolContext context, boolean inNewFrame, Variable... variables) throws EolRuntimeException
EolRuntimeException
public void compile(IEolCompilationContext context)
Copyright © 2020. All rights reserved.