code: 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);
      }
docs: Create an UploadManager from its fully qualified class name.
  
  The class passed in by name must be assignable to UploadManager
  and have 1-parameter constructor accepting a SecorConfig.
  
  See the secor.upload.manager.class config option.
  
  @param className The class name of a subclass of UploadManager
  @param config The SecorCondig to initialize the UploadManager with
  @return an UploadManager instance with the runtime type of the class passed by name
  @throws Exception on error