Package org.dmd.util.exceptions

Examples of org.dmd.util.exceptions.ResultSet


  /**
   * Constructs a new JSON parser.
   */
  public JSONParser(){
    rsG = new ResultSet();
  }
View Full Code Here


     * We parse the specified schema and generate code accordingly.
     * @param args The program arguments.
     */
    public void run(String[] args) {
        CommandLine         cl          = new CommandLine();
        ResultSet           rs          = new ResultSet();

        nameFormat = new PrintfFormat("%-30s");
        numFormat  = new PrintfFormat("%10d");
        colFormat  = new PrintfFormat("%10s");
        longestName = 0;

        packages    = new TreeMap<String,TreeMap<String,CodeCountInfo>>();
        out         = null;

        help = new StringBuffer();
        //            ***************************************************************************
        help.append("count -h -workspace -id -of -r -skip\n\n");
        help.append("The code count tool provides a simple code count mechansism. It indicates the\n");
        help.append("number of source, comment, import and blank lines in a set of Java files\n");
        help.append("and how many files are auto generated.\n");
        help.append("\n");
        help.append("-h          Dumps the help information\n");
        help.append("\n");
        help.append("-workspace  Indicates the workspace prefix.\n");
        help.append("\n");
        help.append("-id         Indicates the directory beneath the workspace at which parsing should start. \n");
        help.append("\n");
        help.append("-of         The output file name.\n");
        help.append("\n");
        help.append("-r          Indicates that you want to recurse through all subdirectories. \n");
        help.append("\n");
        help.append("-skip      (suffix) Indicates that you want to skip subdirectories that end with the \n");
        help.append("           specified suffix.\n");
        help.append("\n");
        help.append("\n");

        cl.addOption("-h",helpFlag,"Dumps the help message.");
        cl.addOption("-o",ofn,"Output file name.");
        cl.addOption("-workspace",   workspace,   "The workspace prefix");
        cl.addOption("-indir",inDir,"The input directory");
        cl.addOption("-of",outDir,"The output directory");
        cl.addOption("-r",recursiveFlag,"Recurses through all subdirectories.");
        cl.addOption("-skip",skip,"Skips the specified directory.");

        cl.parseArgs(args);

        if (ofn.length() > 0){
            try {
                out = new BufferedWriter(new FileWriter(ofn.toString()));
            } catch (IOException e) {
                System.out.println("IO Error:\n" + e);
                System.exit(1);
            }
        }

        // println("The args " + args[0] + "\n");

        if ((args.length == 0) || helpFlag.booleanValue() == true){
            println(help.toString());
            System.exit(0);
        }

        if (workspace.length() == 0){
          System.err.println("You must specify the -workspace argument");
          System.exit(1);
        }
       
        String startDir = workspace.toString();
       
        if (inDir.length() > 0){
          startDir = startDir + File.separator + inDir.toString();
        }

        readDirectory(rs,startDir);

        nameFormat = new PrintfFormat("%-" + longestName + "s");
        totalFormat = new PrintfFormat("%" + longestName + "s");
        dumpInfo();

        println(rs.toString());

        if (out != null){
            try {
                System.out.println("Output written to " + ofn.toString());
                out.close();
View Full Code Here

     * @param dir The directory to which we'll dump.
     * @param jd The javadoc diretory on the webserver.
     */
    public void dumpHtml(SchemaManager sd, String src, String dir, String jd){
//        public void dumpHtml(SchemaManager sd, PmfRuleManager r, String src, String dir, String jd){
        ResultSet   rs = new ResultSet();
        Iterator<SchemaDefinition>    it = null;

        schema  = sd;

        /**
 
View Full Code Here

TOP

Related Classes of org.dmd.util.exceptions.ResultSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.