Pure Java ObjectFactory that instantiates objects using standard Java reflection, however the types of objects
that can be constructed are limited.
Can newInstance: classes with public visibility, outer classes, static inner classes, classes with default constructors
and any class that implements java.io.Serializable.
Cannot newInstance: classes without public visibility, non-static inner classes, classes without default constructors.
Note that any code in the constructor of a class will be executed when the ObjectFactory instantiates the object.
author: Joe Walnes