private static String invokeArgumentMethod(String argValue, String methodName, List<Object> argList,
                                             List<Class<?>> paramTypes)
    throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
    // invoke the method through reflection
    Method method = String.class.getMethod(methodName, paramTypes.toArray(new Class<?>[paramTypes.size()]));

    return (String) method.invoke(argValue, argList.toArray(new Object[argList.size()]));
  }
Invoke a method on the given argument string with the given parameters.
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractPropertyProvider.java