Interface FunctionResolver

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface FunctionResolver

Used for realizing FunctionCall expressions to produce a RiskscapeFunction that can be used during execution of RealizedExpression.evaluate(Object).

  • Method Details

    • resolve

      ResultOrProblems<RiskscapeFunction> resolve(RealizationContext context, FunctionCall functionCall, Type inputType, List<Type> argumentTypes, IdentifiedFunction function)

      Attempt to resolve a function against the given criteria.

      Parameters:
      context - the context in which the function is being resolved, realized and eventually executed
      functionCall - the expression that is being matched
      inputType - the type that the expression is being evaluated against
      argumentTypes - the evaluated types that the function call should expect
      function - the function that was found. This will typically be returned unmolested or adapted in some way so that it will accept the given input types.
      Returns:
      a function that should work with the given inputs, or a failed ResultOrProblems if no RiskscapeFunction could be resolved