code: public static Object construct(Object something) throws Exception {
          if (something instanceof String) {
              return Class.forName((String)something).getConstructor().newInstance();
          } else if (something instanceof Map) {
              // keys are the class name, values are the parameters.
              for (Map.Entry<String, Object> entry : ((Map<String, Object>) something).entrySet()) {
                  if (entry.getValue() instanceof Map) {
                      return constructByNamedParams(Class.forName(entry.getKey()), (Map)entry.getValue());
                  } else if (entry.getValue() instanceof List) {
                      return constructByParameterizedConstructor(Class.forName(entry.getKey()), (List)entry.getValue());
                  }
              }
          }
          return null;
      }
docs: Instantiates and returns an object out of a given configuration.
  If the configuration is simply a class name, assume default empty constructor.
  If the configuration is a map, assume keyed by class name, with values being one of 2 options:
  - map: keys are field names, values are field values.
  - list: items are each maps of type to value, constructor is called with given set.
  @param something parameter that can be a string or a map.
  @return constructed object
  @throws Exception when construction fails.