Package gnu.getopt

Examples of gnu.getopt.LongOpt


    int cflags = 0;
   
    boolean[] options = new boolean [10];
   
    LongOpt[] longOptions = {
        new LongOpt("byte-offset",         LongOpt.NO_ARGUMENT, null, 'b'),
  new LongOpt("count",               LongOpt.NO_ARGUMENT, null, 'c'),
  new LongOpt("no-filename",         LongOpt.NO_ARGUMENT, null, 'h'),
  new LongOpt("ignore-case",         LongOpt.NO_ARGUMENT, null, 'i'),
  new LongOpt("files-with-matches",  LongOpt.NO_ARGUMENT, null, 'l'),
  new LongOpt("help",                LongOpt.NO_ARGUMENT, null, '!'),
  new LongOpt("line-number",         LongOpt.NO_ARGUMENT, null, 'n'),
  new LongOpt("quiet",               LongOpt.NO_ARGUMENT, null, 'q'),
  new LongOpt("silent",              LongOpt.NO_ARGUMENT, null, 'q'),
  new LongOpt("no-messages",         LongOpt.NO_ARGUMENT, null, 's'),
  new LongOpt("revert-match",        LongOpt.NO_ARGUMENT, null, 'v'),
  new LongOpt("line-regexp",         LongOpt.NO_ARGUMENT, null, 'x'),
  new LongOpt("extended-regexp",     LongOpt.NO_ARGUMENT, null, 'E'),
  new LongOpt("fixed-strings",       LongOpt.NO_ARGUMENT, null, 'F'), // TODO
  new LongOpt("basic-regexp",        LongOpt.NO_ARGUMENT, null, 'G'),
  new LongOpt("files-without-match", LongOpt.NO_ARGUMENT, null, 'L'),
  new LongOpt("version",             LongOpt.NO_ARGUMENT, null, 'V')
    };

    Getopt g = new Getopt(PROGNAME, argv, "bchilnqsvxyEFGLV", longOptions);
    int c;
    String arg;
View Full Code Here


      // set this from a system property or default to jboss
      String programName = System.getProperty("program.name", "jboss");
      String sopts = "-:hD:d:p:n:c:Vj::B:L:C:P:b:g:u:m:H:N:";
      LongOpt[] lopts =
      {
            new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
            new LongOpt("bootdir", LongOpt.REQUIRED_ARGUMENT, null, 'd'),
            new LongOpt("patchdir", LongOpt.REQUIRED_ARGUMENT, null, 'p'),
            new LongOpt("netboot", LongOpt.REQUIRED_ARGUMENT, null, 'n'),
            new LongOpt("configuration", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
            new LongOpt("version", LongOpt.NO_ARGUMENT, null, 'V'),
            new LongOpt("jaxp", LongOpt.REQUIRED_ARGUMENT, null, 'j'),
            new LongOpt("bootlib", LongOpt.REQUIRED_ARGUMENT, null, 'B'),
            new LongOpt("library", LongOpt.REQUIRED_ARGUMENT, null, 'L'),
            new LongOpt("classpath", LongOpt.REQUIRED_ARGUMENT, null, 'C'),
            new LongOpt("properties", LongOpt.REQUIRED_ARGUMENT, null, 'P'),
            new LongOpt("host", LongOpt.REQUIRED_ARGUMENT, null, 'b'),
            new LongOpt("partition", LongOpt.REQUIRED_ARGUMENT, null, 'g'),
            new LongOpt("udp", LongOpt.REQUIRED_ARGUMENT, null, 'u'),
            new LongOpt("mcast_port", LongOpt.REQUIRED_ARGUMENT, null, 'm'),
            new LongOpt("hostname", LongOpt.REQUIRED_ARGUMENT, null, 'H'),
            new LongOpt("nodename", LongOpt.REQUIRED_ARGUMENT, null, 'N'),
      };

      Getopt getopt = new Getopt(programName, args, sopts, lopts);
      int code;
      String arg;
View Full Code Here

    }

    String sopts = "-:cf:";
    LongOpt[] lopts =
        {
            new LongOpt( "count", LongOpt.NO_ARGUMENT, null, 'c' ),
            new LongOpt( "filter", LongOpt.REQUIRED_ARGUMENT, null, 'f' ),
        };

    Getopt getopt = new Getopt( null, args, sopts, lopts );
    getopt.setOpterr( false );
View Full Code Here

      }

      String sopts = "-:q:";
      LongOpt[] lopts =
         {
            new LongOpt("query-type", LongOpt.OPTIONAL_ARGUMENT, null, 'q'),
         };

      Getopt getopt = new Getopt(null, args, sopts, lopts);
      getopt.setOpterr(false);
View Full Code Here

      }

      String sopts = "-:";
      LongOpt[] lopts =
         {
            new LongOpt("noprefix", LongOpt.NO_ARGUMENT, null, 0x1000),
         };

      Getopt getopt = new Getopt(null, args, sopts, lopts);
      getopt.setOpterr(false);
View Full Code Here

    log.debug( "processing arguments: " + Strings.join( args, "," ) );

    String sopts = "-:c";
    LongOpt[] lopts =
        {
            new LongOpt( "count", LongOpt.NO_ARGUMENT, null, 'c' ),
        };

    Getopt getopt = new Getopt( null, args, sopts, lopts );
    getopt.setOpterr( false );
View Full Code Here

    }

    String sopts = "-:";
    LongOpt[] lopts =
      {
        new LongOpt("noprefix", LongOpt.NO_ARGUMENT, null, 0x1000),
      };

    Getopt getopt = new Getopt(null, args, sopts, lopts);
    getopt.setOpterr(false);
View Full Code Here

      }
     
      String sopts = "-:dcl";
      LongOpt[] lopts =
      {
         new LongOpt("domain", LongOpt.NO_ARGUMENT, null, 'd'),
         new LongOpt("count", LongOpt.NO_ARGUMENT, null, 'c'),
         new LongOpt("list", LongOpt.NO_ARGUMENT, null, 'l'),
      };

      Getopt getopt = new Getopt(null, args, sopts, lopts);
      getopt.setOpterr(false);
     
View Full Code Here

      }
     
      String sopts = "-:l:";
      LongOpt[] lopts =
      {
         new LongOpt("loader", LongOpt.OPTIONAL_ARGUMENT, null, 'l'),
      };

      Getopt getopt = new Getopt(null, args, sopts, lopts);
      getopt.setOpterr(false);
     
View Full Code Here

      }

      String sopts = "-:";
      LongOpt[] lopts =
         {
            new LongOpt("noprefix", LongOpt.NO_ARGUMENT, null, 0x1000),
         };

      Getopt getopt = new Getopt(null, args, sopts, lopts);
      getopt.setOpterr(false);
View Full Code Here

TOP

Related Classes of gnu.getopt.LongOpt

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.