Class CallableWithArgumentsOf

java.lang.Object
org.ek9lang.compiler.support.operators.CallableWithArgumentsOf
All Implemented Interfaces:
BiPredicate<MethodSymbol, MethodSymbol>

public final class CallableWithArgumentsOf extends Object implements BiPredicate<MethodSymbol, MethodSymbol>
THE "can the existing operator be called with the candidate default's arguments?" - each candidate parameter type assignable to the existing one's, same count. What DefaultOperatorCoverage and the bare-default completion (OperationFactory) ask, by SIGNATURE, never by name. Hold one and ask it.
  • Constructor Details

    • CallableWithArgumentsOf

      public CallableWithArgumentsOf()
  • Method Details

    • test

      public boolean test(MethodSymbol existing, MethodSymbol candidate)
      True when the existing operator can be called with the candidate default's arguments.
      Specified by:
      test in interface BiPredicate<MethodSymbol, MethodSymbol>
      Parameters:
      existing - an operator the type declares
      candidate - the operator a default operator would give it