protected void finalizeChildModules(Collection<? extends StackDefinitionModule> modules) {
    Iterator<? extends StackDefinitionModule> iter = modules.iterator();
    while (iter.hasNext()) {
      StackDefinitionModule module = iter.next();
      module.finalizeModule();
      if (module.isDeleted()) {
        iter.remove();
      }
    }
  }
Finalize a modules child components.
Any child module marked as deleted will be removed from this module after finalizing
the child.

@param modules  child modules to finalize
ambari-server/src/main/java/org/apache/ambari/server/stack/BaseModule.java