Note that this methods does not support auto boxing of primitive types
@param aObject the object
@param methodName the method
@param aArguments the input argument
@return the object return values
@throws Exception
493633
public static Object executeMethod(Object aObject, String methodName, Object[] aArguments)
   throws Exception
   {
	Class<?>[] parameterTypes = null;
	ArrayList<Object> parameterTypeArrayList = null;
	
	if(aArguments != null && aArguments.length >0)
	{
	   
	   //get array of inputs
	   
	     parameterTypeArrayList = new ArrayList<Object>(aArguments.length);
	         
	     for (int i = 0; i < aArguments.length; i++)
	     {
		  if(aArguments[i] == null)
		  {
		     //TODO: throw new RequiredException("argument["+i+"]");
		     parameterTypeArrayList.add(Object.class);
		  }
		  else
		  {
		     parameterTypeArrayList.add(aArguments[i].getClass());   
		  }
		  
		  
	     }
	     	     
	      parameterTypes = (Class[])parameterTypeArrayList.toArray(new Class[parameterTypeArrayList.size()]);  
	}
      
     
      
      //find method
      Method method = null;
      

      method = aObject.getClass().getDeclaredMethod(methodName, parameterTypes);
     
      try
	{
         return method.invoke(aObject, aArguments);
	} 
      catch (Exception e)
	{          
	   throw new SystemException("methodName="+methodName+" object="+aObject.getClass().getName()+" parameters="+parameterTypeArrayList+" EXCEPTION="+Debugger.stackTrace(e));
	}
      
   }
549684
public static Object invokeMethod(Object object, String methodName, Object[] parameters) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
        return invokeMethod(object, methodName, getTypes(parameters), parameters);
    }
1000149
@Override
  public Method getMethod(String methodName, int parameterCount) {
    for (Method method : methods) {
      if (method.getName().equals(methodName) && method.getParameters().size() == parameterCount) {
        return method;
      }
    }
    if (extending != null) {
      return extending.getMethod(methodName, parameterCount);
    }
    return null;
  }
834380
public static String getDescription(String className, String methodName, Object[] args) throws ClassNotFoundException {
        Class targetClass = Class.forName(className);
        Method[] methods = targetClass.getMethods();
        for (Method method : methods) {
            if (method.getName().equals(methodName)) {
                Class[] clazz = method.getParameterTypes();
                if (clazz.length == args.length) {
                    return method.getAnnotation(AopLog.class).value();
                }
            }
        }
        return "";
    }
1216171
@Override
    public Object invokeMethod(String name, Object args) {
        try {
            return super.invokeMethod(name, args);
        } catch (MissingMethodException e) {
            // lets try invoke the method on the real String
            return InvokerHelper.invokeMethod(toString(), name, args);
        }
    }
1056806
public List<Method> listMethods( final Class<?>    classObj,
                                     final String      methodName )
    {
        //
        //    Get the array of methods for my classname.
        //
        Method[] methods = classObj.getMethods();

        List<Method> methodSignatures = new ArrayList<Method>();

        //
        //    Loop round all the methods and print them out.
        //
        for ( int ii = 0; ii < methods.length; ++ii )
        {
            if ( methods[ii].getName().equals( methodName ) )
            {
                methodSignatures.add( methods[ii] );
            }
        }

        return methodSignatures;
    }
371074
static ObjectMethod objectMethodToOverride(ExecutableElement method) {
    String name = method.getSimpleName().toString();
    switch (method.getParameters().size()) {
      case 0:
        if (name.equals("toString")) {
          return ObjectMethod.TO_STRING;
        } else if (name.equals("hashCode")) {
          return ObjectMethod.HASH_CODE;
        }
        break;
      case 1:
        if (name.equals("equals")) {
          TypeMirror param = getOnlyElement(method.getParameters()).asType();
          if (param.getKind().equals(TypeKind.DECLARED)) {
            TypeElement paramType = MoreTypes.asTypeElement(param);
            if (paramType.getQualifiedName().contentEquals("java.lang.Object")) {
              return ObjectMethod.EQUALS;
            }
          }
        }
        break;
      default:
        // No relevant Object methods have more than one parameter.
    }
    return ObjectMethod.NONE;
  }
1341032
public static <T> T invoke(Object obj, String methodName, Object... args) throws UtilException {
		final Method method = getMethodOfObj(obj, methodName, args);
		if (null == method) {
			throw new UtilException(StrUtil.format("No such method: [{}]", methodName));
		}
		return invoke(obj, method, args);
	}
849510
public Object execute(Object[] arguments) throws Exception
	{
		try
		{
			if (this.method == null)
			{
				if (this.parameterTypes == null)
					this.parameterTypes = PROXY.toParameterTypes(arguments);

				this.method = PROXY.findMethod(this.targetClass,
						this.methodName, this.parameterTypes);
			}

			return this.method.invoke(target, arguments);
		}
		catch (IllegalArgumentException e)
		{
			throw new IllegalArgumentException(target.getClass().getName()+"."+this.method+"("+Debugger.toString(e)+")");
		}
		catch (NoSuchMethodException e)
		{
			throw e;
		}
		catch (IllegalAccessException e)
		{
			throw e;
		}
		catch (InvocationTargetException e)
		{
			if (e.getCause() instanceof Exception)
				throw (Exception) e.getCause();
			else
				throw e;
		}

	}
607336
private Object doInvokeMethod(String methodName, Object name, Object args) {
        Reference explicitResult = new Reference();
        if (checkExplicitMethod(methodName, args, explicitResult)) {
            return explicitResult.get();
        } else {
            try {
                return dispatchNodeCall(name, args);
            } catch(MissingMethodException mme) {
                if(mme.getMethod().equals(methodName) && methodMissingDelegate != null) {
                    return methodMissingDelegate.call(methodName, args);
                }
                throw mme;
            }
        }
    }
1291701
public Object invokeMethod(String name, Object args) {
        try {
            return super.invokeMethod(name, args);
        }
        // if the method was not found in the current scope (the script's methods)
        // let's try to see if there's a method closure with the same name in the binding
        catch (MissingMethodException mme) {
            try {
                if (name.equals(mme.getMethod())) {
                    Object boundClosure = getProperty(name);
                    if (boundClosure != null && boundClosure instanceof Closure) {
                        return ((Closure) boundClosure).call((Object[])args);
                    } else {
                        throw mme;
                    }
                } else {
                    throw mme;
                }
            } catch (MissingPropertyException mpe) {
                throw mme;
            }
        }
    }
985354
public static Object invokeMethod(Object obj, String methodName, Object... params) {
        Method method = findMethod(obj, methodName, params);
        return invokeMethod(obj, method, params);
    }
165831
@Nonnull
  public static Class <?> [] getClassArray (@Nullable final Object... aObjs)
  {
    if (ArrayHelper.isEmpty (aObjs))
      return EMPTY_CLASS_ARRAY;

    final Class <?> [] ret = new Class <?> [aObjs.length];
    for (int i = 0; i < aObjs.length; ++i)
      ret[i] = aObjs[i].getClass ();
    return ret;
  }
1035827
public Object invoke(Object target, String... args) throws Exception
    {
        if (getter || method.getParameterTypes().length == 0)
        {
            return method.invoke(target);
        }
        else
        {
            Object[] values = TypeConversion.convert(args, method.getParameterTypes());

            return method.invoke(target, values);
        }
    }
1220405
public synchronized BeanBox addBeanAop(Object aop, String methodNameRegex) {
		checkOrCreateMethodAopRules();
		aopRules.add(new Object[] { BeanBoxUtils.checkAOP(aop), methodNameRegex });
		return this;
	}
225789
@Nullable
  public static String getClassLocalName (@Nullable final Object aObject)
  {
    return aObject == null ? null : getClassLocalName (aObject.getClass ());
  }
628193
public String getAttributeString(String domain, String beanName, String attributeName) throws Exception {
		return getAttributeString(ObjectNameUtil.makeObjectName(domain, beanName), attributeName);
	}