src/main/java/js/container/Container.java
protected void registerInstanceFactory(InstanceType instanceType, InstanceFactory instanceFactory) {
		log.debug("Register instance factory |%s| to |%s|.", instanceFactory.getClass(), instanceType);
		if (instanceFactories.put(instanceType, instanceFactory) != null) {
			throw new BugError("Attempt to override instance type |%s|.", instanceType);
		}
	}
protected void registerInstanceFactory(InstanceType instanceType, InstanceFactory instanceFactory) {
		log.debug("Register instance factory |%s| to |%s|.", instanceFactory.getClass(), instanceType);
		if (instanceFactories.put(instanceType, instanceFactory) != null) {
			throw new BugError("Attempt to override instance type |%s|.", instanceType);
		}
	}
Register instance factory to requested instance type.

@param instanceType instance type used as key for instance factory,
@param instanceFactory instance factory.
@throws BugError if instance type is already registered.