code: @Override public Object invokeMethod(final Object object, final String methodName, final Object[] arguments) {
      Object returnObject = null;
      if (methodName.equals("depends")) {
        for (final Object argument : arguments) {
          if (argument instanceof List<?>) {
            for (final Object item : (List<?>) argument) { returnObject = processArgument(item); }
          }
          else { returnObject = processArgument(argument); }
        }
      }
      else {
        try {
          returnObject = super.invokeMethod(object, methodName, arguments);
          try {
            final Closure<?> closure = (Closure<?>) binding.getVariable(methodName);
            if (closure != null) { methodsInvoked.add(closure); }
          }
          catch (final MissingPropertyException mpe) { /* Purposefully empty */ }
        }
        catch (final MissingMethodException mme) {
          try { returnObject = ((GantBuilder)(binding.getVariable("ant"))).invokeMethod(methodName, arguments); }
          catch (final BuildException be) {
            //  This BuildException could be a real exception due to a failed execution of a found Ant task
            //  (in which case it should be propagated), or it could be due to a failed name lookup (in which
            //  case the MissingMethodException should be propagated).  The big problem is distinguishing the
            //  various uses of Build Exception here -- for now use string search of the exception message to
            //  distinguish the cases.  NB GANT-49 and GANT-68 are the main conflicting issues here :-(
            if (be.getMessage().startsWith("Problem: failed to create task or type")) { throw mme; }
            else { throw be; }
          }
          catch (final Exception e) { throw mme; }
        }
      }
      return returnObject;
    }
docs: Invokes a method on the given object with the given name and arguments. The {@code MetaClass}
  will attempt to pick the best method for the given name and arguments. If a method cannot be invoked a
  {@code MissingMethodException} will be thrown.
  
  @see MissingMethodException
  @param object The instance on which the method is invoked.
  @param methodName The name of the method.
  @param arguments The arguments to the method.
  @return The return value of the method which is {@code null} if the return type is
  {@code void}.