public static UploadManager createUploadManager ( String className , SecorConfig config ) throws Exception { Class < ? > clazz = Class . forName ( className ) ; if ( ! UploadManager . class . isAssignableFrom ( clazz ) ) { throw new IllegalArgumentException ( String . format ( "The class '%s' is not assignable to '%s'." , className , UploadManager . class . getName ( ) ) ) ; } // Assume that subclass of UploadManager has a constructor with the same signature as UploadManager return ( UploadManager ) clazz . getConstructor ( SecorConfig . class ) . newInstance ( config ) ; }
Create an UploadManager from its fully qualified class name .