public static < T > T newInstance ( Class < T > clazz ) throws MjdbcException { try { return clazz . newInstance ( ) ; } catch ( InstantiationException ex ) { throw new MjdbcException ( "Failed to create instance: " + clazz . getName ( ) + " - " + ex . getMessage ( ) ) ; } catch ( IllegalAccessException ex ) { throw new MjdbcException ( "Failed to create instance: " + clazz . getName ( ) + " - " + ex . getMessage ( ) ) ; } }
Creates new Instance of class specified . Default Constructor should be visible in order to create new Instance