@SuppressWarnings("unchecked")
	public static RegSingleton getInstance(String name) {

		if (name == null) {
			name = selfName;
		}

		if (map.get(name) == null) {
			try {
				Class<RegSingleton> cls = (Class<RegSingleton>) Class
						.forName(name);
				RegSingleton instance = cls.newInstance();
				map.put(name, instance);
			} catch (ClassNotFoundException e) {
				e.printStackTrace();
			} catch (InstantiationException e) {
				e.printStackTrace();
			} catch (IllegalAccessException e) {
				e.printStackTrace();
			}
		}

		return map.get(name);
	}