code: public <T> void define(Class<T> classDefinition, ObjectFactory<T> factory) {
          injectorConfiguration = injectorConfiguration.withFactory(classDefinition, factory);
      }
docs: Define a class using a custom object factory.
  @param classDefinition The class to use.
  @param factory The object factory responsible for instantiating the given class.