命令行参数解析库 JCommander

fmms 13年前
     <p>JCommander 是一个非常小的Java 类库,用来解析命令行参数。</p>    <p>示例代码:</p>    <pre class="brush:java; toolbar: true; auto-links: false;">import com.beust.jcommander.Parameter;   public class JCommanderTest {   @Parameter   public List parameters = Lists.newArrayList();     @Parameter(names = { "-log", "-verbose" }, description = "Level of verbosity")   public Integer verbose = 1;     @Parameter(names = "-groups", description = "Comma-separated list of group names to be run")   public String groups;     @Parameter(names = "-debug", description = "Debug mode")   public boolean debug = false; }</pre>    <p></p>    <p><strong>项目主页:</strong><a href="http://www.open-open.com/lib/view/home/1327496757312" target="_blank">http://www.open-open.com/lib/view/home/1327496757312</a></p>