class ModuleStateManagerImpl implements ModuleStateManager {

    @Override
    public Collection<? extends String> getModulesThatSaveStateByDefault()
    {
        Collection<String> moduleNames = New.set();
        synchronized (myControllerMap)
        {
            for (Entry<String, List<Reference<ModuleStateController>>> entry : myControllerMap.entrySet())
            {
                for (Reference<ModuleStateController> ref : entry.getValue())
                {
                    ModuleStateController moduleStateController = ref.get();
                    if (moduleStateController != null && moduleStateController.isSaveStateByDefault())
                    {
                        moduleNames.add(entry.getKey());
                    }
                }
            }
        }
        return moduleNames;
    }

    public  ModuleStateManagerImpl(PreferencesRegistry preferencesRegistry);

}