/* ModuleScopeTable - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
package alloy.semantic;
import java.util.HashMap;

import alloy.util.Dbg;

public class ModuleScopeTable
{
    private static ModuleScopeTable _instance;
    private HashMap _moduleNameToModuleScope = new HashMap();
    
    private ModuleScopeTable() {
	/* empty */
    }
    
    public static ModuleScopeTable getInstance() {
	if (_instance == null)
	    _instance = new ModuleScopeTable();
	return _instance;
    }
    
    public static void init() {
	_instance = null;
    }
    
    public void put(String string, ModuleScope modulescope) {
	_moduleNameToModuleScope.put(string, modulescope);
    }
    
    public ModuleScope get(String string) {
	Dbg.chk(_moduleNameToModuleScope.containsKey(string),
		"lookup of invalid module");
	return (ModuleScope) _moduleNameToModuleScope.get(string);
    }
}
