/**
   * Sets the instance of CheckedActionFactory.
   *
   * @param instance an Object that implements CheckedActionFactory, or null.
   */
  public void setCheckedActionFactory(CheckedActionFactory instance) {
    synchronized (this) {
      CheckedActionFactory oldInstance = this.checkedActionFactory;
      checkedActionFactory = instance;

      if (instance == null) {
        this.checkedActionFactoryClassName = null;
      } else if (instance != oldInstance) {
        String name = ClassloadingUtility.getNameForClass(instance);
        this.checkedActionFactoryClassName = name;
      }
    }
  }