private void applyEnabledPostProcessorModules() {
// Post processor modules have all non post-processor enabled modules as required dependencies
for ( Map.Entry<AcrossModule, AcrossModuleRole> moduleRole : moduleRoles.entrySet() ) {
if ( moduleRole.getValue() == AcrossModuleRole.POSTPROCESSOR ) {
AcrossModule postProcessor = moduleRole.getKey();
if ( postProcessor.isEnabled() ) {
for ( Map.Entry<AcrossModule, AcrossModuleRole> targetModuleRole : moduleRoles.entrySet() ) {
AcrossModule target = targetModuleRole.getKey();
if ( targetModuleRole.getValue() != AcrossModuleRole.POSTPROCESSOR ) {
if ( appliedRequiredDependencies.get( target ).contains( postProcessor ) ) {
LOG.debug(
"Ignoring {} as required dependency for {} since the former is a postprocessor module",
postProcessor.getName(), target.getName() );
appliedRequiredDependencies.get( target ).remove( postProcessor );
}
if ( appliedOptionalDependencies.get( target ).contains( postProcessor ) ) {
LOG.debug(
"Ignoring {} as optional dependency for {} since the former is a postprocessor module",
postProcessor.getName(), target.getName() );
appliedOptionalDependencies.get( target ).remove( postProcessor );
}
// Add the target as a required dependency for the post-processor
appliedRequiredDependencies.get( postProcessor ).add( target );