Class 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 Detail

      • cause

        private transient org.eclipse.emf.ecore.EObject cause
    • 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 expression
        varType - the actual variable type
        init - the initialization expression
    • Method Detail

      • inferType

        public TypeDescriptor<?> inferType()
                                    throws VilException
        Description copied from class: Expression
        Infers the type of this expression including the type of the contained sub-expressions.
        Specified by:
        inferType in class Expression
        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: Expression
        Visits the expression.
        Specified by:
        accept in class Expression
        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