Class DeferredResolvableOperationExpression
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.expressions.Expression
-
- de.uni_hildesheim.sse.vil.expressions.translation.DeferredResolvableOperationExpression
-
class DeferredResolvableOperationExpression extends Expression
Defines a deferrable resolvable operation expression, i.e., a currently unresolved "function pointer". This is needed, as all functions and operations are only known at the end of the translation process, while the initialization expressions of global variables are (currently) resolved before.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.emf.ecore.EObjectcauseprivate Expressioninitprivate TypeDescriptor<?>varType
-
Constructor Summary
Constructors Constructor Description DeferredResolvableOperationExpression(org.eclipse.emf.ecore.EObject cause, TypeDescriptor<?> varType, Expression init)Creates a resolvable operation expression.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectaccept(IExpressionVisitor visitor)Visits the expression.(package private) org.eclipse.emf.ecore.EObjectgetCause()Returns the ECore cause.(package private) ExpressiongetInit()Returns the initialization expression.(package private) TypeDescriptor<?>getVarType()Returns the variable type.TypeDescriptor<?>inferType()Infers the type of this expression including the type of the contained sub-expressions.-
Methods inherited from class net.ssehub.easy.instantiation.core.model.expressions.Expression
replaceEmptyLine
-
-
-
-
Field Detail
-
cause
private transient org.eclipse.emf.ecore.EObject cause
-
varType
private transient TypeDescriptor<?> varType
-
init
private transient Expression init
-
-
Constructor Detail
-
DeferredResolvableOperationExpression
DeferredResolvableOperationExpression(org.eclipse.emf.ecore.EObject cause, TypeDescriptor<?> varType, Expression init)Creates a resolvable operation expression.- Parameters:
cause- the Ecore instance causing this expressionvarType- the actual variable typeinit- the initialization expression
-
-
Method Detail
-
inferType
public TypeDescriptor<?> inferType() throws VilException
Description copied from class:ExpressionInfers the type of this expression including the type of the contained sub-expressions.- Specified by:
inferTypein classExpression- Returns:
- the type of this expression
- Throws:
VilException- in case that inferring the type fails
-
accept
public java.lang.Object accept(IExpressionVisitor visitor) throws VilException
Description copied from class:ExpressionVisits the expression.- Specified by:
acceptin classExpression- Parameters:
visitor- the visitor- Returns:
- the result of visiting this expression (may be null)
- Throws:
VilException- in case that visiting fails (e.g., execution)
-
getCause
org.eclipse.emf.ecore.EObject getCause()
Returns the ECore cause.- Returns:
- the cause
-
getVarType
TypeDescriptor<?> getVarType()
Returns the variable type.- Returns:
- the variable type
-
getInit
Expression getInit()
Returns the initialization expression.- Returns:
- the initialization expression
-
-