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
,ICompilableModuleElement
,IExecutableModuleElement
- Direct Known Subclasses:
Domain
public class ExecutableBlock<T> extends AbstractExecutableModuleElement
-
-
Field Summary
Fields Modifier and Type Field Description protected IExecutableModuleElement
body
protected java.lang.Class<? extends T>
expectedResultClass
protected java.lang.String
role
protected java.lang.String
text
-
Constructor Summary
Constructors Constructor Description ExecutableBlock(java.lang.Class<? extends T> expectedResultClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 java.lang.Object
executeBlockOrExpressionAst(IExecutableModuleElement ast, IEolContext context)
java.lang.Object
executeBody(IEolContext context)
IExecutableModuleElement
getBody()
protected java.lang.Class<? extends T>
getExpectedResultClass()
java.lang.String
getRole()
java.lang.String
getText()
protected void
postExecution()
Any chores to be done after executionvoid
setBody(IExecutableModuleElement body)
void
setRole(java.lang.String role)
void
setText(java.lang.String text)
-
Methods inherited from class org.eclipse.epsilon.common.module.AbstractModuleElement
equals, getChildren, getComments, 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, getFile, getModule, getParent, getRegion, getUri, setModule, setParent, setRegion, setUri
-
-
-
-
Field Detail
-
body
protected IExecutableModuleElement body
-
expectedResultClass
protected java.lang.Class<? extends T> expectedResultClass
-
role
protected java.lang.String role
-
text
protected java.lang.String text
-
-
Constructor Detail
-
ExecutableBlock
public ExecutableBlock(java.lang.Class<? extends T> expectedResultClass)
-
-
Method Detail
-
build
public void build(AST cst, IModule module)
- Specified by:
build
in interfaceModuleElement
- Overrides:
build
in classAbstractModuleElement
-
getText
public java.lang.String getText()
-
setText
public void setText(java.lang.String text)
-
getBody
public IExecutableModuleElement getBody()
-
setBody
public void setBody(IExecutableModuleElement body)
-
getRole
public java.lang.String getRole()
-
setRole
public void setRole(java.lang.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 java.lang.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 java.lang.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
-
getExpectedResultClass
protected java.lang.Class<? extends T> getExpectedResultClass()
-
compile
public void compile(IEolCompilationContext context)
-
-