Class 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
    • 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: 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)