private static Provider instantiate() {
        Provider result;
        try {
            Class<?> providerClass = Class.forName(providerClassName);
            result = (Provider) providerClass.newInstance();
        } catch (ClassNotFoundException e) {
            System.out.println("Unable to locate class " + providerClassName);
            result = null;
        } catch (InstantiationException e) {
            System.out.println("Unable to instantiate class " + providerClassName);
            result = null;
        } catch (IllegalAccessException e) {
            System.out.println("Unable to access class " + providerClassName);
            result = null;
        } catch (ClassCastException e) {
            System.out.println("Unable to cast class " + providerClassName + " to " + Provider.class.getName());
            result = null;
        }
        return result;
    }
private static Provider instantiate ( ) { Provider result ; try { Class < ? > providerClass = Class . forName ( providerClassName ) ; result = ( Provider ) providerClass . newInstance ( ) ; } catch ( ClassNotFoundException e ) { System . out . println ( "Unable to locate class " + providerClassName ) ; result = null ; } catch ( InstantiationException e ) { System . out . println ( "Unable to instantiate class " + providerClassName ) ; result = null ; } catch ( IllegalAccessException e ) { System . out . println ( "Unable to access class " + providerClassName ) ; result = null ; } catch ( ClassCastException e ) { System . out . println ( "Unable to cast class " + providerClassName + " to " + Provider . class . getName ( ) ) ; result = null ; } return result ; }
@return A new instance of {@link #providerClassName} if the class can be found, instantiated and is an instance of {@link Provider}.