public static Object newInstanceForClassName ( final String className ) { try { return newInstance ( Class . forName ( className ) ) ; } catch ( Exception ex ) { throw new Error ( String . format ( "Can't create instance of %s for error %s" , className , ex . getMessage ( ) ) , ex ) ; } }
Find class for name and make an instance through call of the default constructor .