This class helps us to construct new instances.
We don't want to rely on public default constructors and
have to try hard to also use private or protected constructors.
author: Thomas Mahler author: Lance Eason version: $Id: ConstructorHelper.java,v 1.7.2.1 2005/12/21 22:27:47 tomdz Exp $
create a new instance of class clazz.
first use the public default constructor.
If this fails also try to use protected an private constructors.
Parameters: clazz - the class to instantiate the fresh instance of class clazz throws: InstantiationException -
create a new instance of the class represented by the no-argument constructor provided
Parameters: constructor - the zero argument constructor for the class a new instance of the class throws: InstantiationException - throws: ClassNotPersistenceCapableException - if the constructor is null or there is anexception while trying to create a new instance