private void invokeAllMethods(Class c, Object cpdsObj, List props)
      throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
    String key = null;
    String value = null;
    String type = null;
    String methodName = null;
    Method m = null;
    for (final Object prop : props) {
      ConfigProperty cp = (ConfigProperty) prop;
      key = cp.getName();
      value = cp.getValue();
      type = cp.getType();
      if (key.indexOf("password") != -1) {
        value = PasswordUtil.decrypt(String.valueOf(value));
      }
      methodName = "set" + Character.toUpperCase(key.charAt(0))
          + (key.length() > 1 ? key.substring(1) : "");
      try {
        Class cl = null;
        Class realClass = null;
        if ("int".equals(type)) {
          cl = int.class;
          realClass = Integer.class;
        } else {
          cl = ClassPathLoader.getLatest().forName(type);
          realClass = cl;
        }
        Constructor cr = realClass.getConstructor(String.class);
        Object ob = cr.newInstance(value);
        m = c.getMethod(methodName, cl);
        m.invoke(cpdsObj, ob);
      } catch (ClassNotFoundException ex) {
        String exception =
            String.format(
                "DataSourceFactory::invokeAllMethods: Exception in creating Class with the given config-property-type classname. Exception string=%s",
                ex);
        if (logger.isDebugEnabled()) {
          logger.debug(exception, ex);
        }
      } catch (NoSuchMethodException ex) {
        String exception =
            String.format(
                "DataSourceFactory::invokeAllMethods: Exception in creating method using config-property-name property. Exception string=%s",
                ex);
        if (logger.isDebugEnabled()) {
          logger.debug(exception, ex);
        }
      } catch (InstantiationException ex) {
        String exception =
            String.format(
                "DataSourceFactory::invokeAllMethods: Exception in creating instance of the class using the constructor with a String parameter. Exception string=%s",
                ex);
        if (logger.isDebugEnabled()) {
          logger.debug(exception, ex);
        }
      }
    }
  }
dynamically invokes all the methods in the specified object.

Asif: Rewrote the function as the number of properties to be set for a given datasource is
dynamic

Rohit: Rewrote to accomodate the change in cache.xml. property tag is now replaced by
config-property for vendor specific data to get the Class name dynamically. CLass name is
specified in config-property-type tag and is stored in ConfigProperty Data Object after parsing
cache.xml.

@param c class of the object
@param cpdsObj The object
geode-core/src/main/java/org/apache/geode/internal/datasource/DataSourceFactory.java