コード例 #1
0
 /**
  * Adds environments specified in the "compatible with" attribute to the set of supported
  * environments, along with all defaults from the groups they belong to. Returns these
  * environments, not including the defaults.
  */
 private EnvironmentCollection collectCompatibilityEnvironments(
     EnvironmentCollection.Builder supportedEnvironments) {
   EnvironmentCollection compatibilityEnvironments =
       collectEnvironments(compatibilityAttr, supportedEnvironments);
   for (EnvironmentGroup group : compatibilityEnvironments.getGroups()) {
     supportedEnvironments.putAll(group, defaultsProvider.getDefaults(group));
   }
   return compatibilityEnvironments;
 }