code: private static FileReaderWriterFactory createFileReaderWriterFactory(String className,
                                                                           SecorConfig config) throws Exception {
          Class<?> clazz = Class.forName(className);
          if (!FileReaderWriterFactory.class.isAssignableFrom(clazz)) {
              throw new IllegalArgumentException(String.format("The class '%s' is not assignable to '%s'.",
                      className, FileReaderWriterFactory.class.getName()));
          }
  
          try {
              // Try to load constructor that accepts single parameter - secor
              // configuration instance
              return (FileReaderWriterFactory) clazz.getConstructor(SecorConfig.class).newInstance(config);
          } catch (NoSuchMethodException e) {
              // Fallback to parameterless constructor
              return (FileReaderWriterFactory) clazz.newInstance();
          }
      }
docs: Create a FileReaderWriterFactory that is able to read and write a specific type of output log file.
  The class passed in by name must be assignable to FileReaderWriterFactory.
  Allows for pluggable FileReader and FileWriter instances to be constructed for a particular type of log file.
  
  See the secor.file.reader.writer.factory config option.
  
  @param className the class name of a subclass of FileReaderWriterFactory
  @param config The SecorCondig to initialize the FileReaderWriterFactory with
  @return a FileReaderWriterFactory with the runtime type of the class passed by name
  @throws Exception