code: @SuppressWarnings("unchecked")
      public static Map<String, Object> getAllModuleParams(String modulePackageName, Map<String, Object> paramMap) {
          Map<String, Object> result = new HashMap<>();
          try {
              Class<?> moduleClass = Class.forName(modulePackageName);
              while (!moduleClass.getSimpleName().equals("Object")) {
                  Map<String, Object> moduleParams =
                      (Map<String, Object>) paramMap.get(moduleClass.getSimpleName());
                  if (moduleParams != null) {
                      for (String paramName : moduleParams.keySet()) {
                          if (!result.containsKey(paramName)) {
                              result.put(paramName, moduleParams.get(paramName));
                          }
                      }
                  }
                  moduleClass = moduleClass.getSuperclass();
              }
          } catch (Exception e) {
              throw new IllegalArgumentException("Could not locate class '" + modulePackageName + "'", e);
          }
          return result.size() == 0 ? null : result;
      }
docs: Get the parameters defined for the given module in the given parameter map. This
  method first attempts to load the class information for the given module. If it
  cannot be loaded, an IllegalArgumentException is thrown. Otherwise, it searches the
  given map for parameters defined for the module whose name matches the given class's
  "simple name". It also searches for and adds "inherited" parameters belonging to its
  superclasses. For example, assume the class hierarchy:
  <pre>
  ThriftService extends CassandraService extends DBService
  </pre>
  A method called for the ThriftService module searches the given paramMap for
  parameters defined for ThriftService, CassandraService, or DBService and merges
  them into a single map. If a parameter is defined at multiple levels, the
  lowest-level value is used. If no parameters are found for the given module class
  its superclasses, null is returned.
  
  @param   modulePackageName
  Full module package name. Example: "com.dell.doradus.db.thrift.ThriftService".
  @param   paramMap
  Parameter map to search. This map should use the same module/parameter format
  as the ServerParams class.
  @return
  Module's direct and inherited parameters or null if none are found.