code: public static synchronized void set(final ObjectFactory objectFactory) {
      Assert.state(objectFactoryReference == null, "The ObjectFactory reference is already set to ({0})",
        objectFactoryReference);
      objectFactoryReference = objectFactory;
    }
docs: Sets a reference to the ObjectFactory used by the application in this holder.
  
  @param objectFactory the ObjectFactory reference to hold in this reference holder.
  @throws IllegalStateException if the reference holder already holds a reference to an ObjectFactory.
  @see #compareAndSet(ObjectFactory, ObjectFactory)