code: public static void main(String[] args) throws IOException, ClassNotFoundException {
      String[] classes = new String[] {};
      Writer out = null;
      try {
        for (int i=0; i < args.length; i++) {
          String name = args[i];
          if (name.startsWith("-") && name.length() > 1 && ++i < args.length) {
            String argValue = args[i];
            if ( "-classes".equals(name) ) {
              classes = argValue.split("\\s+");
            } else if ( "-file".equals(name) ) {
              out= new FileWriter(argValue);
            }
          }
        }
        if ( out == null ) out = new OutputStreamWriter(System.out);
  
        ObjectMapper mapper = new ObjectMapper();
        generateConfig(classes, mapper, out);
      } finally {
        if ( out != null ) out.close();
      }
    }
docs: Reads the annotations from the specified classes and generates MarkLogic index
  configurations specified by the annotations. Accepts the
  following options:
  -classes: a space-separated list of java pojo classes visible on the classpath
  -file: a file path to write with the output (otherwise uses standard out)
  @param args an array of the above documented options followed directly
  by the value for that option
  @throws IOException if an error occurs reading the classes or writing the output
  @throws IllegalStateException if errors are found in your annotations
  @throws ClassNotFoundException if the classes are not found on the classpath