public class ObjectFactory<T>
Manages dynamic creation of objects from a known set of classes.
An ObjectFactory keeps a list of classes with associated nicknames;
the idea is that you can obtain an instance of a given class by
supplying the nickname in question.
Instead of a nickname you can use the fully qualified classname,
whether or not it has previously been registered.
Any class registered must be a subclass of the superclass specified
when this factory is constructed, and must have a no-arg constructor.
Constructs and returns an object from one of the classes registered
with this factory. If construction fails because the required
class is not on the classpath or there is some error in
class initialization, a LoadException is thrown.
If the class is of the wrong sort (has no no-arg constructor,
is not a subtype of this factory's supertype) a RuntimeException
will be thrown.
spec - classname/nickname of class to instantiate,
followed by optional config text