public static Object getClassForName ( String className ) { Object object = null ; try { Class classDefinition = Class . forName ( className ) ; object = classDefinition . newInstance ( ) ; } catch ( ClassNotFoundException e ) { if ( log . isEnabledFor ( Level . ERROR ) ) { log . error ( "ClassNotFoundException" , e ) ; } } catch ( InstantiationException e ) { if ( log . isEnabledFor ( Level . ERROR ) ) { log . error ( "InstantiationException " + e . getMessage ( ) , e ) ; } } catch ( IllegalAccessException e ) { if ( log . isEnabledFor ( Level . ERROR ) ) { log . error ( "IllegalAccessException" , e ) ; } } return object ; }
Returns object instance from the string representing its class name .