Class ResolvableOperationExpression
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.expressions.Expression
-
- net.ssehub.easy.instantiation.core.model.expressions.ResolvableOperationExpression
-
public class ResolvableOperationExpression extends Expression
Represents a resolved operation in terms of a function pointer. The resolved operation just needs to be the basic operation as dynamic dispatch will follow at runtime.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private IMetaOperationoperationprivate TypeDescriptor<?>type
-
Constructor Summary
Constructors Constructor Description ResolvableOperationExpression(TypeDescriptor<?> type, IMetaOperation operation)Creates a resolvable operation expression, i.e., the expression which (basically) resolves a function pointer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectaccept(IExpressionVisitor visitor)Visits the expression.IMetaOperationgetOperation()Returns the resolved operation.TypeDescriptor<?>getType()Returns the resolvable type descriptor framing the operation.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
getFormattingHint, replaceEmptyLine
-
-
-
-
Field Detail
-
type
private TypeDescriptor<?> type
-
operation
private IMetaOperation operation
-
-
Constructor Detail
-
ResolvableOperationExpression
public ResolvableOperationExpression(TypeDescriptor<?> type, IMetaOperation operation)
Creates a resolvable operation expression, i.e., the expression which (basically) resolves a function pointer.- Parameters:
type- the resolvable operation type (declaring the function pointer)operation- the resolved operation (resolving the function pointer, allow also rules, defs)
-
-
Method Detail
-
getType
public TypeDescriptor<?> getType()
Returns the resolvable type descriptor framing the operation.- Returns:
- the resolvable type descriptor
-
getOperation
public IMetaOperation getOperation()
Returns the resolved operation.- Returns:
- the resolved operation
-
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)
-
-