Package org.eclipse.epsilon.eol.dom
Class ExecutableBlock<T>
- java.lang.Object
-
- org.eclipse.epsilon.common.module.AbstractModuleElement
-
- org.eclipse.epsilon.eol.dom.AbstractExecutableModuleElement
-
- org.eclipse.epsilon.eol.dom.ExecutableBlock<T>
-
- All Implemented Interfaces:
ModuleElement
,IExecutableModuleElement
- Direct Known Subclasses:
Domain
public class ExecutableBlock<T> extends AbstractExecutableModuleElement
-
-
Field Summary
Fields Modifier and Type Field Description protected IExecutableModuleElement
body
protected Class<? extends T>
expectedResultClass
protected String
role
protected String
text
-
Constructor Summary
Constructors Constructor Description ExecutableBlock(Class<? extends T> expectedResultClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(IEolVisitor visitor)
void
build(AST cst, IModule module)
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 executionvoid
setBody(IExecutableModuleElement body)
void
setRole(String role)
void
setText(String text)
-
Methods inherited from class org.eclipse.epsilon.common.module.AbstractModuleElement
equals, getChildren, getComments, getData, getDebugInfo, getFile, getModule, getParent, getRegion, getUri, hashCode, setModule, setParent, setRegion, setUri, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.epsilon.common.module.ModuleElement
getChildren, getComments, getData, getFile, getModule, getParent, getRegion, getUri, setModule, setParent, setRegion, setUri
-
-
-
-
Field Detail
-
body
protected IExecutableModuleElement body
-
role
protected String role
-
text
protected String text
-
-
Method Detail
-
build
public void build(AST cst, IModule module)
- Specified by:
build
in interfaceModuleElement
- Overrides:
build
in classAbstractModuleElement
-
getText
public String getText()
-
setText
public void setText(String text)
-
getBody
public IExecutableModuleElement getBody()
-
setBody
public void setBody(IExecutableModuleElement body)
-
getRole
public String getRole()
-
setRole
public void setRole(String role)
-
execute
public T execute(IEolContext context, Variable... variables) throws EolRuntimeException
- Throws:
EolRuntimeException
-
execute
public T execute(IEolContext context) throws EolRuntimeException
- Throws:
EolRuntimeException
-
executeBlockOrExpressionAst
protected Object executeBlockOrExpressionAst(IExecutableModuleElement ast, IEolContext context) throws EolRuntimeException
- Throws:
EolRuntimeException
-
execute
public T execute(IEolContext context, boolean inNewFrame, FrameType frameType, Variable... variables) throws EolRuntimeException
- Throws:
EolRuntimeException
-
postExecution
protected void postExecution()
Any chores to be done after execution
-
executeBody
public Object executeBody(IEolContext context) throws EolRuntimeException
- Parameters:
context
-- Returns:
- Throws:
EolRuntimeException
-
execute
public T execute(IEolContext context, boolean inNewFrame, Variable... variables) throws EolRuntimeException
- Throws:
EolRuntimeException
-
accept
public void accept(IEolVisitor visitor)
-
-