code: public C createObject(String className, Class clazz, DynamicInitializer<C> di) throws ClassNotFoundException {
          C object;
          try {
              object = (C) clazz.newInstance();
  
          } catch (InstantiationException ie) {
              String info = "Could not create " + description + " object: " + className
                      + ". Could not access object constructor: ";
              info += ie.getMessage();
              throw new ClassNotFoundException(info, ie);
  
          } catch (IllegalAccessException iae) {
              String info = "Could not create " + description + " object: " + className
                      + ". Could not instantiate object. Does the object classname refer to an abstract class, "
                      + "an interface or the like?: ";
              info += iae.getMessage();
              throw new ClassNotFoundException(info, iae);
  
          } catch (ClassCastException cce) {
              String info = "Could not create " + description + " object: " + className
                      + ". The specified object classname does not refer to the proper type: ";
              info += cce.getMessage();
              throw new ClassNotFoundException(info, cce);
          }
  
          // Initialize object
          if (null != di) {
              di.initialize(object);
          }
  
          return object;
      }
docs: Creates an instance from a Class.
  <p>
  Supports the use of a dynamic initializer
  (see {@link  org.gautelis.vopn.lang.DynamicInitializer}&lt;C&gt;)