Class AbstractCallExpression.ConvertibleOperation

  • Enclosing class:
    AbstractCallExpression

    private static class AbstractCallExpression.ConvertibleOperation
    extends java.lang.Object
    Stores an operation as well as the required type conversion operations.
    Author:
    Holger Eichelberger
    • Constructor Detail

      • ConvertibleOperation

        ConvertibleOperation​(IMetaOperation operation,
                             IMetaOperation[] conversions)
        Creates a convertible operation instance describing the operation as well as the required conversions per parameter.
        Parameters:
        operation - the candidate operation resolving this call expression
        conversions - the conversion operations (may contain null values if a conversion for a specific parameter is not required)
    • Method Detail

      • getScore

        public int getScore​(CallArgument[] arguments,
                            int unnamedArgsCount)
                     throws VilException
        Returns the conversions core to compare similar canidates.
        Parameters:
        arguments - the actual arguments
        unnamedArgsCount - the number of unnamed arguments in arguments
        Returns:
        the number of conversions
        Throws:
        VilException - in case that types cannot be inferred