package refactoring.struts; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.struts.config.ActionConfig; public class LogMissingDispatchAction { private final Map> mappingsLogged; public LogMissingDispatchAction() { mappingsLogged = new HashMap>(); } public void logMapping(String dispatchActionFileName, ActionConfig actionConfig) { List loggedConfigsForThisFile = this.mappingsLogged.get(dispatchActionFileName); if (loggedConfigsForThisFile == null) { loggedConfigsForThisFile = new ArrayList(); loggedConfigsForThisFile.add(actionConfig); this.mappingsLogged.put(dispatchActionFileName, loggedConfigsForThisFile); } else { loggedConfigsForThisFile.add(actionConfig); } } public Map> getLoggedMappings() { return this.mappingsLogged; } }