/**
   * This method return an implementation of EnvironmentFactoryIfc.
   *
   * @param classContext represents the class that desires a factory.
   * @return an implementation of EnvironmentFactoryIfc.
   */
  public EnvironmentFactoryIfc getFactory(final Class classContext) {
    final FactoryContextIfc factoryContext = FactoryContext.getSingleton();

    EnvironmentFactoryIfc retVal =
        (EnvironmentFactoryIfc) factoryContext.getFactoryForContext(this, classContext);

    if (retVal == null) {
      retVal = getDefaultFactory();
    }

    return retVal;
  }
  /** Default constructor not allowed. */
  private EnvironmentFactoryMgr() {
    final FactoryContextIfc factoryContext = FactoryContext.getSingleton();

    EnvironmentFactoryIfc defaultFactory =
        (EnvironmentFactoryIfc) factoryContext.getDefaultFactory(this);

    if (defaultFactory == null) {
      defaultFactory = DefaultEnvironmentFactory.getSingleton().getDefaultFactory();
    }

    _defaultFactory = defaultFactory;
  }