ClassLoadingRules classLoadingRules = environment.getClassLoadingRules();
classLoadingRules.setInverseClassLoading(environmentType.isInverseClassloading());
if (environmentType.getHiddenClasses() != null) {
ClassLoadingRule hiddenRule = classLoadingRules.getHiddenRule();
List<String> filter = environmentType.getHiddenClasses().getFilter();
hiddenRule.setClassPrefixes(new HashSet<String>(filter));
}
if (environmentType.getNonOverridableClasses() != null) {
ClassLoadingRule nonOverrideableRule = classLoadingRules.getNonOverrideableRule();
List<String> filter = environmentType.getNonOverridableClasses().getFilter();
nonOverrideableRule.setClassPrefixes(new HashSet<String>(filter));
}
}
if (!environment.isSuppressDefaultEnvironment()) {
EnvironmentBuilder.mergeEnvironments(environment, defaultEnvironment);
}