(Collection<Method> methods, List<MathFunction> functions)
| 69 | } |
| 70 | |
| 71 | static void addFunctions(Collection<Method> methods, List<MathFunction> functions) { |
| 72 | Math: |
| 73 | for (Method method : methods) { |
| 74 | if (method.getReturnType() == double.class) { |
| 75 | if (method.getParameterCount() != 1 || |
| 76 | (method.getParameterTypes()[0] != Object[].class && method.getParameterTypes()[0] != Double[].class)) { |
| 77 | int index = 0; |
| 78 | for (Class<?> cls : method.getParameterTypes()) { |
| 79 | if (cls != double.class && cls != String.class && !(index == 0 && cls == MathParser.class)) |
| 80 | continue Math; |
| 81 | index++; |
| 82 | } |
| 83 | } |
| 84 | functions.add(MathFunction.wrap(method)); |
| 85 | } |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | static MathFunction getFunction(String src, int index, String name, int count, List<MathFunction> innerFunctions) throws MathFunctionInvalidArgumentsException { |
| 90 | MathFunction function = null; |
no test coverage detected