Class ExactSingleParameter

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

public final class ExactSingleParameter extends Object implements BiPredicate<MethodSymbol, ISymbol>
THE test "this method or operator takes exactly ONE parameter, and its type is EXACTLY this type" - by isExactSameType, never by assignability. Hold one and ask it: the question a copy constructor (CopyConstructor), a copy operator :=: taking exactly its owner (SelfCopy) and the nearest-operator lookup (DeclaredOperator) each asked in their own words (front-end rationalisation X-3).

Deliberately NOT sameness/TakesItself (behind HasOwnComparator), which asks "is the owner ASSIGNABLE to the parameter type" - a comparison against a trait or a super is still a comparison with itself there. And not IsSelfComparison, which is the same assignable rule. Two questions, two answers; never a third.

  • Constructor Details

    • ExactSingleParameter

      public ExactSingleParameter()
  • Method Details