diff options
author | Cedric Beust <cedric@beust.com> | 2010-07-29 12:57:34 -0700 |
---|---|---|
committer | Cedric Beust <cedric@beust.com> | 2010-07-29 12:57:34 -0700 |
commit | 1eb22b901f731760a479740312337471363febff (patch) | |
tree | d4abf5f6b24f1fcd74276d428b3117200db520c5 /doc | |
parent | 99382985135cbca5c4b9a82211132145e59f961b (diff) | |
download | jcommander-1eb22b901f731760a479740312337471363febff.tar.gz |
Moved findConverter to JCommander
Diffstat (limited to 'doc')
-rw-r--r-- | doc/index.html | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/doc/index.html b/doc/index.html index a089b0a..5420f3e 100644 --- a/doc/index.html +++ b/doc/index.html @@ -97,13 +97,13 @@ When a <tt>Parameter</tt> annotation is found on a field of type <tt>String</tt> public Integer verbose = 1; </pre> -<pre class="brush: bash"> +<pre class="brush: plain"> java Main -log 3 </pre> will cause the field <tt>verbose</tt> to receive the value 3, however: -<pre class="brush: bash"> +<pre class="brush: plain"> java Main -log test </pre> @@ -120,7 +120,7 @@ public List<String> hosts = new ArrayList<String>(); will allow you to parse the following command line: -<pre class="brush: bash"> +<pre class="brush: plain"> java Main -host host1 -verbose -host host2 </pre> @@ -139,7 +139,7 @@ public class ArgsPassword { When you run your program, you will get the following prompt: -<pre class="brush: bash"> +<pre class="brush: plain"> Value for -password (Connection password): </pre> @@ -189,7 +189,7 @@ public interface IStringConverterFactory { For example, suppose you need to parse a string representing a host and a port: -<pre class="brush: bash"> +<pre class="brush: plain"> java App -target example.com:8080 </pre> @@ -267,7 +267,7 @@ public Integer debug = 1; will allow you to parse: -<pre class="brush: bash"> +<pre class="brush: plain"> java Main -debug file1 file2 </pre> @@ -298,13 +298,13 @@ Assert.assertEquals(args.getVerbose().intValue(), 3); By default, parameters are separated by spaces, but you can change this setting to allow different separators: -<pre class="brush: bash"> +<pre class="brush: plain"> java Main -log:3 </pre> or -<pre class="brush: bash"> +<pre class="brush: plain"> java Main -level=42 </pre> @@ -365,13 +365,13 @@ JCommander supports the @ syntax, which allows you to put all your options into <p> <div class="sourcetitle">/tmp/parameters</div> -<pre class="brush: bash"> +<pre class="brush: plain"> -verbose file1 file2 file3 </pre> -<pre class="brush: bash"> +<pre class="brush: plain"> java Main @/tmp/parameters </pre> @@ -380,7 +380,7 @@ java Main @/tmp/parameters If some of your parameters require more than one value, such as the following example where two values are expected after <tt>-pairs</tt>: -<pre class="brush: bash"> +<pre class="brush: plain"> java Main -pairs slave master foo.xml </pre> @@ -416,7 +416,7 @@ You can specify more than one option name: will allow both following syntaxes: -<pre class="brush: bash"> +<pre class="brush: plain"> java Main -d /tmp java Main --outputDirectory /tmp </pre> @@ -491,8 +491,7 @@ point. You can invoke <tt>usage()</tt> on the <tt>JCommander</tt> instance that you used to parse your command line in order to generate a summary of all the options that your program understands: -<pre class="brush: bash"> - +<pre class="brush: plain"> Usage: <main class> [options] Options: -debug Debug mode (default: false) @@ -534,7 +533,7 @@ Your bundle needs to define this key: <br> <h3 class="sourcetitle">MessageBundle_fr_FR.properties</h3> -<pre class="brush: bash"> +<pre class="brush: plain"> host: Hôte </pre> @@ -550,7 +549,7 @@ You can download JCommander from the following locations: <ul> <li><a href="http://github.com/cbeust/jcommander">Source on github</a></li> - <li><a href="http://beust.com/jcommander-1.2-SNAPSHOT.jar">Jar file</a></li> + <li><a href="http://beust.com/jcommander/jcommander-1.4.jar">Jar file</a></li> <li>Or if you are using Maven, add the following dependency to your <tt>pom.xml</tt>: <pre class="brush: xml"> @@ -558,7 +557,7 @@ You can download JCommander from the following locations: <dependency> <groupId>com.beust</groupId> <artifactId>jcommander</artifactId> - <version>1.3</version> + <version>1.4</version> </dependency> </pre> |