Add documentation.

The factory must have a public zero-arg constructor.