@ SuppressWarnings ( "unchecked" ) public static < T > T getObjectInstance ( String className ) { try { Class clazz = Class . forName ( className ) ; return ( T ) clazz . newInstance ( ) ; } catch ( Exception e ) { throw new Error ( e ) ; } }
Returns an arbitrary object instance based on a class name .