(Object obj, String methodName, Object... parameters)
| 102 | |
| 103 | |
| 104 | public static Object invoke(Object obj, String methodName, Object... parameters) { |
| 105 | try { |
| 106 | ArrayList classes = new ArrayList(); |
| 107 | if (parameters != null) { |
| 108 | for(int i = 0; i < parameters.length; ++i) { |
| 109 | Object o1 = parameters[i]; |
| 110 | if (o1 != null) { |
| 111 | classes.add(o1.getClass()); |
| 112 | } else { |
| 113 | classes.add((Object)null); |
| 114 | } |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | Method method = ClassLoaderUtils.getMethodByClass(obj.getClass(), methodName, (Class[])classes.toArray(new Class[0])); |
| 119 | return method.invoke(obj, parameters); |
| 120 | } catch (Exception var7) { |
| 121 | return null; |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | public static Method getMethodByClass(Class cs, String methodName, Class... parameters) { |
| 126 | Method method = null; |
no test coverage detected