(Class target)
| 1658 | // 1) Target is a functional interface and not already implemented by AFn |
| 1659 | // 2) Target method matches one of our fn invoker methods (0 <= arity <= 10) |
| 1660 | static java.lang.reflect.Method maybeFIMethod(Class target) { |
| 1661 | if (target != null && target.isAnnotationPresent(FunctionalInterface.class) |
| 1662 | && !AFN_FIS.contains(target)) { |
| 1663 | |
| 1664 | java.lang.reflect.Method[] methods = target.getMethods(); |
| 1665 | for (java.lang.reflect.Method method : methods) { |
| 1666 | if (method.getParameterCount() >= 0 && method.getParameterCount() <= 10 |
| 1667 | && Modifier.isAbstract(method.getModifiers()) |
| 1668 | && !OBJECT_METHODS.contains(method.getName())) |
| 1669 | return method; |
| 1670 | } |
| 1671 | } |
| 1672 | return null; |
| 1673 | } |
| 1674 | |
| 1675 | // Invokers support only long, double, Object params; widen numerics |
| 1676 | private static Class toInvokerParamType(Class c) { |
no test coverage detected