Package org.eclipse.epsilon.eol.dom
Class Operation
- java.lang.Object
-
- org.eclipse.epsilon.common.module.AbstractModuleElement
-
- org.eclipse.epsilon.eol.dom.AnnotatableModuleElement
-
- org.eclipse.epsilon.eol.dom.Operation
-
- All Implemented Interfaces:
ModuleElement
- Direct Known Subclasses:
TemplateOperation
public class Operation extends AnnotatableModuleElement
-
-
Field Summary
Fields Modifier and Type Field Description protected StatementBlock
body
protected Map<Object,Object>
cache
protected EolType
contextType
protected TypeExpression
contextTypeExpression
protected List<Parameter>
formalParameters
protected boolean
isCached
protected NameExpression
nameExpression
protected EolType
returnType
protected TypeExpression
returnTypeExpression
-
Fields inherited from class org.eclipse.epsilon.eol.dom.AnnotatableModuleElement
annotationBlock
-
-
Constructor Summary
Constructors Constructor Description Operation()
-
Method Summary
-
Methods inherited from class org.eclipse.epsilon.eol.dom.AnnotatableModuleElement
getAnnotation, getAnnotationBlock, getAnnotations, getAnnotationsValues, getBooleanAnnotationValue, getBooleanAnnotationValue, getBooleanAnnotationValue, getBooleanAnnotationValue, hasAnnotation, setAnnotationBlock
-
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
-
-
-
-
Field Detail
-
nameExpression
protected NameExpression nameExpression
-
contextTypeExpression
protected TypeExpression contextTypeExpression
-
returnTypeExpression
protected TypeExpression returnTypeExpression
-
contextType
protected EolType contextType
-
returnType
protected EolType returnType
-
body
protected StatementBlock body
-
isCached
protected boolean isCached
-
-
Method Detail
-
build
public void build(AST cst, IModule module)
- Specified by:
build
in interfaceModuleElement
- Overrides:
build
in classAnnotatableModuleElement
-
clearCache
public void clearCache()
-
toString
public String toString()
- Overrides:
toString
in classAbstractModuleElement
-
isCached
public boolean isCached()
-
execute
public Object execute(Object self, List<?> parameterValues, IEolContext context) throws EolRuntimeException
- Throws:
EolRuntimeException
-
execute
public Object execute(Object self, List<?> parameterValues, IEolContext context, boolean inNewStackFrame) throws EolRuntimeException
- Throws:
EolRuntimeException
-
executeBody
protected Object executeBody(IEolContext context) throws EolRuntimeException
- Throws:
EolRuntimeException
-
evaluatePreConditions
protected void evaluatePreConditions(IEolContext context) throws EolRuntimeException
- Throws:
EolRuntimeException
-
checkResultType
protected void checkResultType(Object result, IEolContext context) throws EolRuntimeException
- Throws:
EolRuntimeException
-
evaluatePostConditions
protected void evaluatePostConditions(IEolContext context, Object result) throws EolRuntimeException
- Throws:
EolRuntimeException
-
getReturnType
public EolType getReturnType(IEolContext context) throws EolRuntimeException
- Throws:
EolRuntimeException
-
getContextType
public EolType getContextType(IEolContext context) throws EolRuntimeException
- Throws:
EolRuntimeException
-
getName
public String getName()
-
getBody
public StatementBlock getBody()
-
setBody
public void setBody(StatementBlock body)
-
getNameExpression
public NameExpression getNameExpression()
-
setNameExpression
public void setNameExpression(NameExpression nameExpression)
-
getContextTypeExpression
public TypeExpression getContextTypeExpression()
-
setContextTypeExpression
public void setContextTypeExpression(TypeExpression contextTypeExpression)
-
getReturnTypeExpression
public TypeExpression getReturnTypeExpression()
-
setReturnTypeExpression
public void setReturnTypeExpression(TypeExpression returnTypeExpression)
-
accept
public void accept(IEolVisitor visitor)
- Overrides:
accept
in classAnnotatableModuleElement
-
-