public static < T > T newCheckedInstanceOfProperty ( final String propertyName , final Class < T > clazz ) throws ClassNotFoundException , NoSuchMethodException , InvocationTargetException , InstantiationException , IllegalAccessException { final String className = PropertiesUtil . getProperties ( ) . getStringProperty ( propertyName ) ; if ( className == null ) { return null ; } return newCheckedInstanceOf ( className , clazz ) ; }
Loads and instantiates a class given by a property name .