code: public static void main(String[] args) throws Exception {
          initCache();
          List<String> allClassnames = getAllClassNames();
          PrintStream out = System.out;
          if (args.length > 0)
              out = new PrintStream(new File(args[0]));
          Collections.sort(allClassnames);
          for (String clsname: allClassnames)
              out.println(clsname);
          out.flush();
          if (args.length > 0)
              out.close();
      }
docs: Outputs all class names below "moa" either to stdout or to the
  file provided as first argument.
  
  @param args optional file for storing the classnames
  @throws Exception if writing to file fails