Home | History | Annotate | Download | only in args
      1 /**
      2  * Copyright (C) 2010 the original author or authors.
      3  * See the notice.md file distributed with this work for additional
      4  * information regarding copyright ownership.
      5  *
      6  * Licensed under the Apache License, Version 2.0 (the "License");
      7  * you may not use this file except in compliance with the License.
      8  * You may obtain a copy of the License at
      9  *
     10  *     http://www.apache.org/licenses/LICENSE-2.0
     11  *
     12  * Unless required by applicable law or agreed to in writing, software
     13  * distributed under the License is distributed on an "AS IS" BASIS,
     14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     15  * See the License for the specific language governing permissions and
     16  * limitations under the License.
     17  */
     18 
     19 package com.beust.jcommander.args;
     20 
     21 import com.beust.jcommander.Parameter;
     22 import com.beust.jcommander.converters.FileConverter;
     23 
     24 import java.io.File;
     25 import java.util.List;
     26 
     27 public class CommandLineArgs2 {
     28   @Parameter(description = "list of files")
     29   List<String> list;
     30 
     31   @Parameter(names = { "-v", "--verbose" }, description = "print verbose log messages.", arity = 1)
     32   public boolean verbose = false;
     33 
     34   @Parameter(names = { "-h", "--help" }, description = "show this help.")
     35   public boolean showHelp = false;
     36 
     37   @Parameter(names = { "-F", "--flush-preferences" }, description = "flush gui preferences.")
     38   public boolean flushPreferences = false;
     39 
     40   @Parameter(names = { "-L", "--flush-licensed" }, description = "flush licensed.")
     41   public boolean flushLicensed = false;
     42 
     43   @Parameter(names = { "-I", "--index-file" }, description = "indexes the given file.")
     44   public Long indexFile;
     45 
     46   @Parameter(names = { "-b", "--bonjour" }, description = "enable Bonjour.")
     47   public boolean enableBonjour = false;
     48 
     49   @Parameter(names = { "-m", "--md5" }, description = "create an MD5 checksum for the given file.", converter = FileConverter.class)
     50   public File md5File;
     51 
     52   @Parameter(names = { "-c", "--cat" }, description = "'cat' the given Lilith logfile.", converter = FileConverter.class)
     53   public File catFile;
     54 
     55   @Parameter(names = { "-t", "--tail" }, description = "'tail' the given Lilith logfile.", converter = FileConverter.class)
     56   public File tailFile;
     57 
     58   @Parameter(names = { "-p", "--pattern" }, description = "pattern used by 'cat' or 'tail'.")
     59   public String pattern;
     60 
     61   @Parameter(names = { "-f", "--keep-running" }, description = "keep tailing the given Lilith logfile.")
     62   public boolean keepRunning = false;
     63 
     64   @Parameter(names = { "-n", "--number-of-lines" }, description = "number of entries printed by cat or tail")
     65   public Integer numberOfLines = -1;
     66 
     67   @Parameter(names = { "-e", "--export-preferences" }, description = "export preferences into the given file.")
     68   public String exportPreferencesFile;
     69 
     70   @Parameter(names = { "-i", "--import-preferences" }, description = "import preferences from the given file.")
     71   public String importPreferencesFile;
     72 }
     73