Predicate<JvmMethod> (final JvmMethod than) { return m -> { if (m.isConstructor() || !Objects.equals(m.getName(), than.getName())) { return false; } Iterator<TypeRepr> it = m.getArgTypes().iterator(); for (TypeRepr thanArgType : than.getArgTypes()) { if (!it.hasNext()) { return false; } TypeRepr mArgType = it.next(); Boolean subtypeOf = isSubtypeOf(thanArgType, mArgType); if (subtypeOf != null && !subtypeOf) { return false; } } return !it.hasNext(); }; }