src/main/java/js/container/Container.java
protected void registerScopeFactory(ScopeFactory scopeFactory) {
		if (scopeFactory == null) {
			log.debug("Register null scope factory to |%s|.", InstanceScope.LOCAL);
			scopeFactories.put(InstanceScope.LOCAL, null);
			return;
		}

		final InstanceScope instanceScope = scopeFactory.getInstanceScope();
		log.debug("Register scope factory |%s| to |%s|.", scopeFactory.getClass(), instanceScope);
		if (scopeFactories.put(instanceScope, scopeFactory) != null) {
			throw new BugError("Attempt to override instance scope |%s|.", instanceScope);
		}
	}
protected void registerScopeFactory(ScopeFactory scopeFactory) {
		if (scopeFactory == null) {
			log.debug("Register null scope factory to |%s|.", InstanceScope.LOCAL);
			scopeFactories.put(InstanceScope.LOCAL, null);
			return;
		}

		final InstanceScope instanceScope = scopeFactory.getInstanceScope();
		log.debug("Register scope factory |%s| to |%s|.", scopeFactory.getClass(), instanceScope);
		if (scopeFactories.put(instanceScope, scopeFactory) != null) {
			throw new BugError("Attempt to override instance scope |%s|.", instanceScope);
		}
	}
Register scope factory for the instance scope returned by {@link ScopeFactory#getInstanceScope()}.

@param scopeFactory scope factory instance, possible null for local scope.
@throws BugError if instance scope is already registered.