Invoke a method on the given object with the given arguments. @param object The object the method should be invoked on. @param methodName The name of the method to invoke. @param arguments The arguments to the invoked method as null, a Tuple, an array or a single argument of any type. @return
(final Object object, final String methodName, final Object arguments)
| 860 | * @return The result of the method invocation. |
| 861 | */ |
| 862 | @Override |
| 863 | public Object invokeMethod(final Object object, final String methodName, final Object arguments) { |
| 864 | if (arguments == null) { |
| 865 | return invokeMethod(object, methodName, EMPTY_ARGUMENTS); |
| 866 | } |
| 867 | if (arguments instanceof Tuple) { |
| 868 | return invokeMethod(object, methodName, ((Tuple<?>) arguments).toArray()); |
| 869 | } |
| 870 | if (arguments instanceof Object[]) { |
| 871 | return invokeMethod(object, methodName, (Object[]) arguments); |
| 872 | } |
| 873 | return invokeMethod(object, methodName, new Object[]{arguments}); |
| 874 | } |
| 875 | |
| 876 | /** |
| 877 | * Invoke a missing method on the given object with the given arguments. |
no test coverage detected