code: private Object processNestedObject(Class targetClass, Method method, Class parameterType, String keyPrefix,
                                         Map<Class, Class> processedClassRelations, int arrayIndex, boolean
                                                 watchAllFields) throws Exception {
  
          Object nestedTarget = parameterType.getConstructor().newInstance();
          Class nestedTargetClass = nestedTarget.getClass();
  
          // check for cycles
          if (processedClassRelations.containsKey(nestedTargetClass) && processedClassRelations.get(nestedTargetClass)
                  .equals(targetClass)) {
              log.warning("There is a cycle in the configuration class tree. ConfigBundle class may not " +
                      "be populated as expected.");
          } else {
  
              String key = getKeyName(targetClass, method.getName(), keyPrefix);
  
              if (arrayIndex >= 0) {
                  key += "[" + arrayIndex + "]";
              }
  
              boolean isEmpty = processConfigBundleBeanSetters(nestedTarget, nestedTargetClass, key,
                      processedClassRelations, watchAllFields);
  
              if (isEmpty) {
                  return null;
              }
          }
  
          return nestedTarget;
      }
docs: Create a new instance for nested class, check for cycles and populate nested instance.
  
  @param targetClass             target class
  @param method                  processed method
  @param parameterType           parameter type
  @param keyPrefix               prefix used for generation of a configuration key
  @param processedClassRelations class pairs that have already been processed (for cycle detection)
  @param arrayIndex              array index for arrays of nested objects
  @param watchAllFields          if true, enable watch on all fields
  @return
  @throws Exception