boolean isApplicable(TypeConfiguration that) {
   List<TypeKind> actuals = that.typeKindList;
   List<TypeKind> formals = parameterTypes.typeKindList;
   if ((actuals.size() - formals.size()) < -1) return false; // not enough args
   for (TypeKind actual : actuals) {
     if (!actual.isSubtypeOf(formals.head)) return false; // type mismatch
     formals = formals.tail.isEmpty() ? formals : formals.tail;
   }
   return true;
 }
Example #2
0
 boolean isMoreSpecificThan(VarargsMethod that) {
   return varargsElement.isSubtypeOf(that.varargsElement);
 }
Example #3
0
 boolean isApplicable(TypeKind actual, ArgumentsArity argsArity) {
   return argsArity == ArgumentsArity.ZERO || actual.isSubtypeOf(varargsElement);
 }