commons-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r950741 [20/40] - in /websites/production/commons/content/proper/commons-cli: ./ apidocs/ apidocs/org/apache/commons/cli/ apidocs/org/apache/commons/cli/class-use/ apidocs/resources/ apidocs/src-html/org/apache/commons/cli/ cobertura/ jacoc...
Date Sat, 09 May 2015 18:19:17 GMT
Modified: websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/Option.Builder.html
==============================================================================
--- websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/Option.Builder.html (original)
+++ websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/Option.Builder.html Sat May  9 18:19:15 2015
@@ -45,7 +45,7 @@
 <span class="sourceLineNo">037</span> * @see org.apache.commons.cli.Options<a name="line.37"></a>
 <span class="sourceLineNo">038</span> * @see org.apache.commons.cli.CommandLine<a name="line.38"></a>
 <span class="sourceLineNo">039</span> *<a name="line.39"></a>
-<span class="sourceLineNo">040</span> * @version $Id: Option.java 1669874 2015-03-29 09:10:08Z britter $<a name="line.40"></a>
+<span class="sourceLineNo">040</span> * @version $Id: Option.java 1677406 2015-05-03 14:27:31Z britter $<a name="line.40"></a>
 <span class="sourceLineNo">041</span> */<a name="line.41"></a>
 <span class="sourceLineNo">042</span>public class Option implements Cloneable, Serializable<a name="line.42"></a>
 <span class="sourceLineNo">043</span>{<a name="line.43"></a>
@@ -471,7 +471,7 @@
 <span class="sourceLineNo">463</span>            while (index != -1)<a name="line.463"></a>
 <span class="sourceLineNo">464</span>            {<a name="line.464"></a>
 <span class="sourceLineNo">465</span>                // next value to be added <a name="line.465"></a>
-<span class="sourceLineNo">466</span>                if (values.size() == (numberOfArgs - 1))<a name="line.466"></a>
+<span class="sourceLineNo">466</span>                if (values.size() == numberOfArgs - 1)<a name="line.466"></a>
 <span class="sourceLineNo">467</span>                {<a name="line.467"></a>
 <span class="sourceLineNo">468</span>                    break;<a name="line.468"></a>
 <span class="sourceLineNo">469</span>                }<a name="line.469"></a>
@@ -674,7 +674,7 @@
 <span class="sourceLineNo">666</span>     *<a name="line.666"></a>
 <span class="sourceLineNo">667</span>     * @return a clone of this Option instance<a name="line.667"></a>
 <span class="sourceLineNo">668</span>     * @throws RuntimeException if a {@link CloneNotSupportedException} has been thrown<a name="line.668"></a>
-<span class="sourceLineNo">669</span>     * by {@link super#clone()}<a name="line.669"></a>
+<span class="sourceLineNo">669</span>     * by {@code super.clone()}<a name="line.669"></a>
 <span class="sourceLineNo">670</span>     */<a name="line.670"></a>
 <span class="sourceLineNo">671</span>    @Override<a name="line.671"></a>
 <span class="sourceLineNo">672</span>    public Object clone()<a name="line.672"></a>

Modified: websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/Option.html
==============================================================================
--- websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/Option.html (original)
+++ websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/Option.html Sat May  9 18:19:15 2015
@@ -45,7 +45,7 @@
 <span class="sourceLineNo">037</span> * @see org.apache.commons.cli.Options<a name="line.37"></a>
 <span class="sourceLineNo">038</span> * @see org.apache.commons.cli.CommandLine<a name="line.38"></a>
 <span class="sourceLineNo">039</span> *<a name="line.39"></a>
-<span class="sourceLineNo">040</span> * @version $Id: Option.java 1669874 2015-03-29 09:10:08Z britter $<a name="line.40"></a>
+<span class="sourceLineNo">040</span> * @version $Id: Option.java 1677406 2015-05-03 14:27:31Z britter $<a name="line.40"></a>
 <span class="sourceLineNo">041</span> */<a name="line.41"></a>
 <span class="sourceLineNo">042</span>public class Option implements Cloneable, Serializable<a name="line.42"></a>
 <span class="sourceLineNo">043</span>{<a name="line.43"></a>
@@ -471,7 +471,7 @@
 <span class="sourceLineNo">463</span>            while (index != -1)<a name="line.463"></a>
 <span class="sourceLineNo">464</span>            {<a name="line.464"></a>
 <span class="sourceLineNo">465</span>                // next value to be added <a name="line.465"></a>
-<span class="sourceLineNo">466</span>                if (values.size() == (numberOfArgs - 1))<a name="line.466"></a>
+<span class="sourceLineNo">466</span>                if (values.size() == numberOfArgs - 1)<a name="line.466"></a>
 <span class="sourceLineNo">467</span>                {<a name="line.467"></a>
 <span class="sourceLineNo">468</span>                    break;<a name="line.468"></a>
 <span class="sourceLineNo">469</span>                }<a name="line.469"></a>
@@ -674,7 +674,7 @@
 <span class="sourceLineNo">666</span>     *<a name="line.666"></a>
 <span class="sourceLineNo">667</span>     * @return a clone of this Option instance<a name="line.667"></a>
 <span class="sourceLineNo">668</span>     * @throws RuntimeException if a {@link CloneNotSupportedException} has been thrown<a name="line.668"></a>
-<span class="sourceLineNo">669</span>     * by {@link super#clone()}<a name="line.669"></a>
+<span class="sourceLineNo">669</span>     * by {@code super.clone()}<a name="line.669"></a>
 <span class="sourceLineNo">670</span>     */<a name="line.670"></a>
 <span class="sourceLineNo">671</span>    @Override<a name="line.671"></a>
 <span class="sourceLineNo">672</span>    public Object clone()<a name="line.672"></a>

Modified: websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/OptionBuilder.html
==============================================================================
--- websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/OptionBuilder.html (original)
+++ websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/OptionBuilder.html Sat May  9 18:19:15 2015
@@ -33,7 +33,7 @@
 <span class="sourceLineNo">025</span> * &lt;p&gt;<a name="line.25"></a>
 <span class="sourceLineNo">026</span> * This class is NOT thread safe. See &lt;a href="https://issues.apache.org/jira/browse/CLI-209"&gt;CLI-209&lt;/a&gt;<a name="line.26"></a>
 <span class="sourceLineNo">027</span> * <a name="line.27"></a>
-<span class="sourceLineNo">028</span> * @version $Id: OptionBuilder.java 1669814 2015-03-28 18:09:26Z britter $<a name="line.28"></a>
+<span class="sourceLineNo">028</span> * @version $Id: OptionBuilder.java 1677400 2015-05-03 13:46:08Z britter $<a name="line.28"></a>
 <span class="sourceLineNo">029</span> * @since 1.0<a name="line.29"></a>
 <span class="sourceLineNo">030</span> * @deprecated since 1.3, use {@link Option#builder(String)} instead<a name="line.30"></a>
 <span class="sourceLineNo">031</span> */<a name="line.31"></a>
@@ -65,7 +65,7 @@
 <span class="sourceLineNo">057</span>    private static char valuesep;<a name="line.57"></a>
 <span class="sourceLineNo">058</span><a name="line.58"></a>
 <span class="sourceLineNo">059</span>    /** option builder instance */<a name="line.59"></a>
-<span class="sourceLineNo">060</span>    private static final OptionBuilder instance = new OptionBuilder();<a name="line.60"></a>
+<span class="sourceLineNo">060</span>    private static final OptionBuilder INSTANCE = new OptionBuilder();<a name="line.60"></a>
 <span class="sourceLineNo">061</span><a name="line.61"></a>
 <span class="sourceLineNo">062</span>    static<a name="line.62"></a>
 <span class="sourceLineNo">063</span>    {<a name="line.63"></a>
@@ -106,7 +106,7 @@
 <span class="sourceLineNo">098</span>    {<a name="line.98"></a>
 <span class="sourceLineNo">099</span>        OptionBuilder.longopt = newLongopt;<a name="line.99"></a>
 <span class="sourceLineNo">100</span><a name="line.100"></a>
-<span class="sourceLineNo">101</span>        return instance;<a name="line.101"></a>
+<span class="sourceLineNo">101</span>        return INSTANCE;<a name="line.101"></a>
 <span class="sourceLineNo">102</span>    }<a name="line.102"></a>
 <span class="sourceLineNo">103</span><a name="line.103"></a>
 <span class="sourceLineNo">104</span>    /**<a name="line.104"></a>
@@ -118,7 +118,7 @@
 <span class="sourceLineNo">110</span>    {<a name="line.110"></a>
 <span class="sourceLineNo">111</span>        OptionBuilder.numberOfArgs = 1;<a name="line.111"></a>
 <span class="sourceLineNo">112</span><a name="line.112"></a>
-<span class="sourceLineNo">113</span>        return instance;<a name="line.113"></a>
+<span class="sourceLineNo">113</span>        return INSTANCE;<a name="line.113"></a>
 <span class="sourceLineNo">114</span>    }<a name="line.114"></a>
 <span class="sourceLineNo">115</span><a name="line.115"></a>
 <span class="sourceLineNo">116</span>    /**<a name="line.116"></a>
@@ -132,7 +132,7 @@
 <span class="sourceLineNo">124</span>    {<a name="line.124"></a>
 <span class="sourceLineNo">125</span>        OptionBuilder.numberOfArgs = hasArg ? 1 : Option.UNINITIALIZED;<a name="line.125"></a>
 <span class="sourceLineNo">126</span><a name="line.126"></a>
-<span class="sourceLineNo">127</span>        return instance;<a name="line.127"></a>
+<span class="sourceLineNo">127</span>        return INSTANCE;<a name="line.127"></a>
 <span class="sourceLineNo">128</span>    }<a name="line.128"></a>
 <span class="sourceLineNo">129</span><a name="line.129"></a>
 <span class="sourceLineNo">130</span>    /**<a name="line.130"></a>
@@ -145,7 +145,7 @@
 <span class="sourceLineNo">137</span>    {<a name="line.137"></a>
 <span class="sourceLineNo">138</span>        OptionBuilder.argName = name;<a name="line.138"></a>
 <span class="sourceLineNo">139</span><a name="line.139"></a>
-<span class="sourceLineNo">140</span>        return instance;<a name="line.140"></a>
+<span class="sourceLineNo">140</span>        return INSTANCE;<a name="line.140"></a>
 <span class="sourceLineNo">141</span>    }<a name="line.141"></a>
 <span class="sourceLineNo">142</span><a name="line.142"></a>
 <span class="sourceLineNo">143</span>    /**<a name="line.143"></a>
@@ -157,7 +157,7 @@
 <span class="sourceLineNo">149</span>    {<a name="line.149"></a>
 <span class="sourceLineNo">150</span>        OptionBuilder.required = true;<a name="line.150"></a>
 <span class="sourceLineNo">151</span><a name="line.151"></a>
-<span class="sourceLineNo">152</span>        return instance;<a name="line.152"></a>
+<span class="sourceLineNo">152</span>        return INSTANCE;<a name="line.152"></a>
 <span class="sourceLineNo">153</span>    }<a name="line.153"></a>
 <span class="sourceLineNo">154</span><a name="line.154"></a>
 <span class="sourceLineNo">155</span>    /**<a name="line.155"></a>
@@ -183,7 +183,7 @@
 <span class="sourceLineNo">175</span>    {<a name="line.175"></a>
 <span class="sourceLineNo">176</span>        OptionBuilder.valuesep = sep;<a name="line.176"></a>
 <span class="sourceLineNo">177</span><a name="line.177"></a>
-<span class="sourceLineNo">178</span>        return instance;<a name="line.178"></a>
+<span class="sourceLineNo">178</span>        return INSTANCE;<a name="line.178"></a>
 <span class="sourceLineNo">179</span>    }<a name="line.179"></a>
 <span class="sourceLineNo">180</span><a name="line.180"></a>
 <span class="sourceLineNo">181</span>    /**<a name="line.181"></a>
@@ -206,7 +206,7 @@
 <span class="sourceLineNo">198</span>    {<a name="line.198"></a>
 <span class="sourceLineNo">199</span>        OptionBuilder.valuesep = '=';<a name="line.199"></a>
 <span class="sourceLineNo">200</span><a name="line.200"></a>
-<span class="sourceLineNo">201</span>        return instance;<a name="line.201"></a>
+<span class="sourceLineNo">201</span>        return INSTANCE;<a name="line.201"></a>
 <span class="sourceLineNo">202</span>    }<a name="line.202"></a>
 <span class="sourceLineNo">203</span><a name="line.203"></a>
 <span class="sourceLineNo">204</span>    /**<a name="line.204"></a>
@@ -220,7 +220,7 @@
 <span class="sourceLineNo">212</span>    {<a name="line.212"></a>
 <span class="sourceLineNo">213</span>        OptionBuilder.required = newRequired;<a name="line.213"></a>
 <span class="sourceLineNo">214</span><a name="line.214"></a>
-<span class="sourceLineNo">215</span>        return instance;<a name="line.215"></a>
+<span class="sourceLineNo">215</span>        return INSTANCE;<a name="line.215"></a>
 <span class="sourceLineNo">216</span>    }<a name="line.216"></a>
 <span class="sourceLineNo">217</span><a name="line.217"></a>
 <span class="sourceLineNo">218</span>    /**<a name="line.218"></a>
@@ -232,7 +232,7 @@
 <span class="sourceLineNo">224</span>    {<a name="line.224"></a>
 <span class="sourceLineNo">225</span>        OptionBuilder.numberOfArgs = Option.UNLIMITED_VALUES;<a name="line.225"></a>
 <span class="sourceLineNo">226</span><a name="line.226"></a>
-<span class="sourceLineNo">227</span>        return instance;<a name="line.227"></a>
+<span class="sourceLineNo">227</span>        return INSTANCE;<a name="line.227"></a>
 <span class="sourceLineNo">228</span>    }<a name="line.228"></a>
 <span class="sourceLineNo">229</span><a name="line.229"></a>
 <span class="sourceLineNo">230</span>    /**<a name="line.230"></a>
@@ -245,7 +245,7 @@
 <span class="sourceLineNo">237</span>    {<a name="line.237"></a>
 <span class="sourceLineNo">238</span>        OptionBuilder.numberOfArgs = num;<a name="line.238"></a>
 <span class="sourceLineNo">239</span><a name="line.239"></a>
-<span class="sourceLineNo">240</span>        return instance;<a name="line.240"></a>
+<span class="sourceLineNo">240</span>        return INSTANCE;<a name="line.240"></a>
 <span class="sourceLineNo">241</span>    }<a name="line.241"></a>
 <span class="sourceLineNo">242</span><a name="line.242"></a>
 <span class="sourceLineNo">243</span>    /**<a name="line.243"></a>
@@ -258,7 +258,7 @@
 <span class="sourceLineNo">250</span>        OptionBuilder.numberOfArgs = 1;<a name="line.250"></a>
 <span class="sourceLineNo">251</span>        OptionBuilder.optionalArg = true;<a name="line.251"></a>
 <span class="sourceLineNo">252</span><a name="line.252"></a>
-<span class="sourceLineNo">253</span>        return instance;<a name="line.253"></a>
+<span class="sourceLineNo">253</span>        return INSTANCE;<a name="line.253"></a>
 <span class="sourceLineNo">254</span>    }<a name="line.254"></a>
 <span class="sourceLineNo">255</span><a name="line.255"></a>
 <span class="sourceLineNo">256</span>    /**<a name="line.256"></a>
@@ -271,7 +271,7 @@
 <span class="sourceLineNo">263</span>        OptionBuilder.numberOfArgs = Option.UNLIMITED_VALUES;<a name="line.263"></a>
 <span class="sourceLineNo">264</span>        OptionBuilder.optionalArg = true;<a name="line.264"></a>
 <span class="sourceLineNo">265</span><a name="line.265"></a>
-<span class="sourceLineNo">266</span>        return instance;<a name="line.266"></a>
+<span class="sourceLineNo">266</span>        return INSTANCE;<a name="line.266"></a>
 <span class="sourceLineNo">267</span>    }<a name="line.267"></a>
 <span class="sourceLineNo">268</span><a name="line.268"></a>
 <span class="sourceLineNo">269</span>    /**<a name="line.269"></a>
@@ -286,7 +286,7 @@
 <span class="sourceLineNo">278</span>        OptionBuilder.numberOfArgs = numArgs;<a name="line.278"></a>
 <span class="sourceLineNo">279</span>        OptionBuilder.optionalArg = true;<a name="line.279"></a>
 <span class="sourceLineNo">280</span><a name="line.280"></a>
-<span class="sourceLineNo">281</span>        return instance;<a name="line.281"></a>
+<span class="sourceLineNo">281</span>        return INSTANCE;<a name="line.281"></a>
 <span class="sourceLineNo">282</span>    }<a name="line.282"></a>
 <span class="sourceLineNo">283</span><a name="line.283"></a>
 <span class="sourceLineNo">284</span>    /**<a name="line.284"></a>
@@ -318,7 +318,7 @@
 <span class="sourceLineNo">310</span>    {<a name="line.310"></a>
 <span class="sourceLineNo">311</span>        OptionBuilder.type = newType;<a name="line.311"></a>
 <span class="sourceLineNo">312</span><a name="line.312"></a>
-<span class="sourceLineNo">313</span>        return instance;<a name="line.313"></a>
+<span class="sourceLineNo">313</span>        return INSTANCE;<a name="line.313"></a>
 <span class="sourceLineNo">314</span>    }<a name="line.314"></a>
 <span class="sourceLineNo">315</span><a name="line.315"></a>
 <span class="sourceLineNo">316</span>    /**<a name="line.316"></a>
@@ -331,7 +331,7 @@
 <span class="sourceLineNo">323</span>    {<a name="line.323"></a>
 <span class="sourceLineNo">324</span>        OptionBuilder.description = newDescription;<a name="line.324"></a>
 <span class="sourceLineNo">325</span><a name="line.325"></a>
-<span class="sourceLineNo">326</span>        return instance;<a name="line.326"></a>
+<span class="sourceLineNo">326</span>        return INSTANCE;<a name="line.326"></a>
 <span class="sourceLineNo">327</span>    }<a name="line.327"></a>
 <span class="sourceLineNo">328</span><a name="line.328"></a>
 <span class="sourceLineNo">329</span>    /**<a name="line.329"></a>

Modified: websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/Parser.html
==============================================================================
--- websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/Parser.html (original)
+++ websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/Parser.html Sat May  9 18:19:15 2015
@@ -35,7 +35,7 @@
 <span class="sourceLineNo">027</span>/**<a name="line.27"></a>
 <span class="sourceLineNo">028</span> * &lt;code&gt;Parser&lt;/code&gt; creates {@link CommandLine}s.<a name="line.28"></a>
 <span class="sourceLineNo">029</span> *<a name="line.29"></a>
-<span class="sourceLineNo">030</span> * @version $Id: Parser.java 1445352 2013-02-12 20:48:19Z tn $<a name="line.30"></a>
+<span class="sourceLineNo">030</span> * @version $Id: Parser.java 1677406 2015-05-03 14:27:31Z britter $<a name="line.30"></a>
 <span class="sourceLineNo">031</span> * @deprecated since 1.3, the two-pass parsing with the flatten method is not enough flexible to handle complex cases<a name="line.31"></a>
 <span class="sourceLineNo">032</span> */<a name="line.32"></a>
 <span class="sourceLineNo">033</span>@Deprecated<a name="line.33"></a>
@@ -75,363 +75,367 @@
 <span class="sourceLineNo">067</span>     * @param stopAtNonOption specifies whether to stop<a name="line.67"></a>
 <span class="sourceLineNo">068</span>     * flattening when a non option has been encountered<a name="line.68"></a>
 <span class="sourceLineNo">069</span>     * @return a String array of the flattened arguments<a name="line.69"></a>
-<span class="sourceLineNo">070</span>     */<a name="line.70"></a>
-<span class="sourceLineNo">071</span>    protected abstract String[] flatten(Options opts, String[] arguments, boolean stopAtNonOption)<a name="line.71"></a>
-<span class="sourceLineNo">072</span>            throws ParseException;<a name="line.72"></a>
-<span class="sourceLineNo">073</span><a name="line.73"></a>
-<span class="sourceLineNo">074</span>    /**<a name="line.74"></a>
-<span class="sourceLineNo">075</span>     * Parses the specified &lt;code&gt;arguments&lt;/code&gt; based<a name="line.75"></a>
-<span class="sourceLineNo">076</span>     * on the specified {@link Options}.<a name="line.76"></a>
-<span class="sourceLineNo">077</span>     *<a name="line.77"></a>
-<span class="sourceLineNo">078</span>     * @param options the &lt;code&gt;Options&lt;/code&gt;<a name="line.78"></a>
-<span class="sourceLineNo">079</span>     * @param arguments the &lt;code&gt;arguments&lt;/code&gt;<a name="line.79"></a>
-<span class="sourceLineNo">080</span>     * @return the &lt;code&gt;CommandLine&lt;/code&gt;<a name="line.80"></a>
-<span class="sourceLineNo">081</span>     * @throws ParseException if an error occurs when parsing the<a name="line.81"></a>
-<span class="sourceLineNo">082</span>     * arguments.<a name="line.82"></a>
-<span class="sourceLineNo">083</span>     */<a name="line.83"></a>
-<span class="sourceLineNo">084</span>    public CommandLine parse(Options options, String[] arguments) throws ParseException<a name="line.84"></a>
-<span class="sourceLineNo">085</span>    {<a name="line.85"></a>
-<span class="sourceLineNo">086</span>        return parse(options, arguments, null, false);<a name="line.86"></a>
-<span class="sourceLineNo">087</span>    }<a name="line.87"></a>
-<span class="sourceLineNo">088</span><a name="line.88"></a>
-<span class="sourceLineNo">089</span>    /**<a name="line.89"></a>
-<span class="sourceLineNo">090</span>     * Parse the arguments according to the specified options and properties.<a name="line.90"></a>
-<span class="sourceLineNo">091</span>     *<a name="line.91"></a>
-<span class="sourceLineNo">092</span>     * @param options    the specified Options<a name="line.92"></a>
-<span class="sourceLineNo">093</span>     * @param arguments  the command line arguments<a name="line.93"></a>
-<span class="sourceLineNo">094</span>     * @param properties command line option name-value pairs<a name="line.94"></a>
-<span class="sourceLineNo">095</span>     * @return the list of atomic option and value tokens<a name="line.95"></a>
-<span class="sourceLineNo">096</span>     * @throws ParseException if there are any problems encountered<a name="line.96"></a>
-<span class="sourceLineNo">097</span>     *                        while parsing the command line tokens.<a name="line.97"></a>
-<span class="sourceLineNo">098</span>     *<a name="line.98"></a>
-<span class="sourceLineNo">099</span>     * @since 1.1<a name="line.99"></a>
-<span class="sourceLineNo">100</span>     */<a name="line.100"></a>
-<span class="sourceLineNo">101</span>    public CommandLine parse(Options options, String[] arguments, Properties properties) throws ParseException<a name="line.101"></a>
-<span class="sourceLineNo">102</span>    {<a name="line.102"></a>
-<span class="sourceLineNo">103</span>        return parse(options, arguments, properties, false);<a name="line.103"></a>
-<span class="sourceLineNo">104</span>    }<a name="line.104"></a>
-<span class="sourceLineNo">105</span><a name="line.105"></a>
-<span class="sourceLineNo">106</span>    /**<a name="line.106"></a>
-<span class="sourceLineNo">107</span>     * Parses the specified &lt;code&gt;arguments&lt;/code&gt;<a name="line.107"></a>
-<span class="sourceLineNo">108</span>     * based on the specified {@link Options}.<a name="line.108"></a>
-<span class="sourceLineNo">109</span>     *<a name="line.109"></a>
-<span class="sourceLineNo">110</span>     * @param options         the &lt;code&gt;Options&lt;/code&gt;<a name="line.110"></a>
-<span class="sourceLineNo">111</span>     * @param arguments       the &lt;code&gt;arguments&lt;/code&gt;<a name="line.111"></a>
-<span class="sourceLineNo">112</span>     * @param stopAtNonOption if &lt;tt&gt;true&lt;/tt&gt; an unrecognized argument stops<a name="line.112"></a>
-<span class="sourceLineNo">113</span>     *     the parsing and the remaining arguments are added to the <a name="line.113"></a>
-<span class="sourceLineNo">114</span>     *     {@link CommandLine}s args list. If &lt;tt&gt;false&lt;/tt&gt; an unrecognized<a name="line.114"></a>
-<span class="sourceLineNo">115</span>     *     argument triggers a ParseException.<a name="line.115"></a>
-<span class="sourceLineNo">116</span>     * @return the &lt;code&gt;CommandLine&lt;/code&gt;<a name="line.116"></a>
-<span class="sourceLineNo">117</span>     * @throws ParseException if an error occurs when parsing the arguments.<a name="line.117"></a>
-<span class="sourceLineNo">118</span>     */<a name="line.118"></a>
-<span class="sourceLineNo">119</span>    public CommandLine parse(Options options, String[] arguments, boolean stopAtNonOption) throws ParseException<a name="line.119"></a>
-<span class="sourceLineNo">120</span>    {<a name="line.120"></a>
-<span class="sourceLineNo">121</span>        return parse(options, arguments, null, stopAtNonOption);<a name="line.121"></a>
-<span class="sourceLineNo">122</span>    }<a name="line.122"></a>
-<span class="sourceLineNo">123</span><a name="line.123"></a>
-<span class="sourceLineNo">124</span>    /**<a name="line.124"></a>
-<span class="sourceLineNo">125</span>     * Parse the arguments according to the specified options and<a name="line.125"></a>
-<span class="sourceLineNo">126</span>     * properties.<a name="line.126"></a>
-<span class="sourceLineNo">127</span>     *<a name="line.127"></a>
-<span class="sourceLineNo">128</span>     * @param options the specified Options<a name="line.128"></a>
-<span class="sourceLineNo">129</span>     * @param arguments the command line arguments<a name="line.129"></a>
-<span class="sourceLineNo">130</span>     * @param properties command line option name-value pairs<a name="line.130"></a>
-<span class="sourceLineNo">131</span>     * @param stopAtNonOption if &lt;tt&gt;true&lt;/tt&gt; an unrecognized argument stops<a name="line.131"></a>
-<span class="sourceLineNo">132</span>     *     the parsing and the remaining arguments are added to the <a name="line.132"></a>
-<span class="sourceLineNo">133</span>     *     {@link CommandLine}s args list. If &lt;tt&gt;false&lt;/tt&gt; an unrecognized<a name="line.133"></a>
-<span class="sourceLineNo">134</span>     *     argument triggers a ParseException.<a name="line.134"></a>
-<span class="sourceLineNo">135</span>     *<a name="line.135"></a>
-<span class="sourceLineNo">136</span>     * @return the list of atomic option and value tokens<a name="line.136"></a>
+<span class="sourceLineNo">070</span>     * @throws ParseException if there are any problems encountered<a name="line.70"></a>
+<span class="sourceLineNo">071</span>     *                        while parsing the command line tokens.<a name="line.71"></a>
+<span class="sourceLineNo">072</span>     */<a name="line.72"></a>
+<span class="sourceLineNo">073</span>    protected abstract String[] flatten(Options opts, String[] arguments, boolean stopAtNonOption)<a name="line.73"></a>
+<span class="sourceLineNo">074</span>            throws ParseException;<a name="line.74"></a>
+<span class="sourceLineNo">075</span><a name="line.75"></a>
+<span class="sourceLineNo">076</span>    /**<a name="line.76"></a>
+<span class="sourceLineNo">077</span>     * Parses the specified &lt;code&gt;arguments&lt;/code&gt; based<a name="line.77"></a>
+<span class="sourceLineNo">078</span>     * on the specified {@link Options}.<a name="line.78"></a>
+<span class="sourceLineNo">079</span>     *<a name="line.79"></a>
+<span class="sourceLineNo">080</span>     * @param options the &lt;code&gt;Options&lt;/code&gt;<a name="line.80"></a>
+<span class="sourceLineNo">081</span>     * @param arguments the &lt;code&gt;arguments&lt;/code&gt;<a name="line.81"></a>
+<span class="sourceLineNo">082</span>     * @return the &lt;code&gt;CommandLine&lt;/code&gt;<a name="line.82"></a>
+<span class="sourceLineNo">083</span>     * @throws ParseException if there are any problems encountered<a name="line.83"></a>
+<span class="sourceLineNo">084</span>     *                        while parsing the command line tokens.<a name="line.84"></a>
+<span class="sourceLineNo">085</span>     */<a name="line.85"></a>
+<span class="sourceLineNo">086</span>    public CommandLine parse(Options options, String[] arguments) throws ParseException<a name="line.86"></a>
+<span class="sourceLineNo">087</span>    {<a name="line.87"></a>
+<span class="sourceLineNo">088</span>        return parse(options, arguments, null, false);<a name="line.88"></a>
+<span class="sourceLineNo">089</span>    }<a name="line.89"></a>
+<span class="sourceLineNo">090</span><a name="line.90"></a>
+<span class="sourceLineNo">091</span>    /**<a name="line.91"></a>
+<span class="sourceLineNo">092</span>     * Parse the arguments according to the specified options and properties.<a name="line.92"></a>
+<span class="sourceLineNo">093</span>     *<a name="line.93"></a>
+<span class="sourceLineNo">094</span>     * @param options    the specified Options<a name="line.94"></a>
+<span class="sourceLineNo">095</span>     * @param arguments  the command line arguments<a name="line.95"></a>
+<span class="sourceLineNo">096</span>     * @param properties command line option name-value pairs<a name="line.96"></a>
+<span class="sourceLineNo">097</span>     * @return the list of atomic option and value tokens<a name="line.97"></a>
+<span class="sourceLineNo">098</span>     * @throws ParseException if there are any problems encountered<a name="line.98"></a>
+<span class="sourceLineNo">099</span>     *                        while parsing the command line tokens.<a name="line.99"></a>
+<span class="sourceLineNo">100</span>     *<a name="line.100"></a>
+<span class="sourceLineNo">101</span>     * @since 1.1<a name="line.101"></a>
+<span class="sourceLineNo">102</span>     */<a name="line.102"></a>
+<span class="sourceLineNo">103</span>    public CommandLine parse(Options options, String[] arguments, Properties properties) throws ParseException<a name="line.103"></a>
+<span class="sourceLineNo">104</span>    {<a name="line.104"></a>
+<span class="sourceLineNo">105</span>        return parse(options, arguments, properties, false);<a name="line.105"></a>
+<span class="sourceLineNo">106</span>    }<a name="line.106"></a>
+<span class="sourceLineNo">107</span><a name="line.107"></a>
+<span class="sourceLineNo">108</span>    /**<a name="line.108"></a>
+<span class="sourceLineNo">109</span>     * Parses the specified &lt;code&gt;arguments&lt;/code&gt;<a name="line.109"></a>
+<span class="sourceLineNo">110</span>     * based on the specified {@link Options}.<a name="line.110"></a>
+<span class="sourceLineNo">111</span>     *<a name="line.111"></a>
+<span class="sourceLineNo">112</span>     * @param options         the &lt;code&gt;Options&lt;/code&gt;<a name="line.112"></a>
+<span class="sourceLineNo">113</span>     * @param arguments       the &lt;code&gt;arguments&lt;/code&gt;<a name="line.113"></a>
+<span class="sourceLineNo">114</span>     * @param stopAtNonOption if &lt;tt&gt;true&lt;/tt&gt; an unrecognized argument stops<a name="line.114"></a>
+<span class="sourceLineNo">115</span>     *     the parsing and the remaining arguments are added to the <a name="line.115"></a>
+<span class="sourceLineNo">116</span>     *     {@link CommandLine}s args list. If &lt;tt&gt;false&lt;/tt&gt; an unrecognized<a name="line.116"></a>
+<span class="sourceLineNo">117</span>     *     argument triggers a ParseException.<a name="line.117"></a>
+<span class="sourceLineNo">118</span>     * @return the &lt;code&gt;CommandLine&lt;/code&gt;<a name="line.118"></a>
+<span class="sourceLineNo">119</span>     * @throws ParseException if an error occurs when parsing the arguments.<a name="line.119"></a>
+<span class="sourceLineNo">120</span>     */<a name="line.120"></a>
+<span class="sourceLineNo">121</span>    public CommandLine parse(Options options, String[] arguments, boolean stopAtNonOption) throws ParseException<a name="line.121"></a>
+<span class="sourceLineNo">122</span>    {<a name="line.122"></a>
+<span class="sourceLineNo">123</span>        return parse(options, arguments, null, stopAtNonOption);<a name="line.123"></a>
+<span class="sourceLineNo">124</span>    }<a name="line.124"></a>
+<span class="sourceLineNo">125</span><a name="line.125"></a>
+<span class="sourceLineNo">126</span>    /**<a name="line.126"></a>
+<span class="sourceLineNo">127</span>     * Parse the arguments according to the specified options and<a name="line.127"></a>
+<span class="sourceLineNo">128</span>     * properties.<a name="line.128"></a>
+<span class="sourceLineNo">129</span>     *<a name="line.129"></a>
+<span class="sourceLineNo">130</span>     * @param options the specified Options<a name="line.130"></a>
+<span class="sourceLineNo">131</span>     * @param arguments the command line arguments<a name="line.131"></a>
+<span class="sourceLineNo">132</span>     * @param properties command line option name-value pairs<a name="line.132"></a>
+<span class="sourceLineNo">133</span>     * @param stopAtNonOption if &lt;tt&gt;true&lt;/tt&gt; an unrecognized argument stops<a name="line.133"></a>
+<span class="sourceLineNo">134</span>     *     the parsing and the remaining arguments are added to the <a name="line.134"></a>
+<span class="sourceLineNo">135</span>     *     {@link CommandLine}s args list. If &lt;tt&gt;false&lt;/tt&gt; an unrecognized<a name="line.135"></a>
+<span class="sourceLineNo">136</span>     *     argument triggers a ParseException.<a name="line.136"></a>
 <span class="sourceLineNo">137</span>     *<a name="line.137"></a>
-<span class="sourceLineNo">138</span>     * @throws ParseException if there are any problems encountered<a name="line.138"></a>
-<span class="sourceLineNo">139</span>     * while parsing the command line tokens.<a name="line.139"></a>
-<span class="sourceLineNo">140</span>     *<a name="line.140"></a>
-<span class="sourceLineNo">141</span>     * @since 1.1<a name="line.141"></a>
-<span class="sourceLineNo">142</span>     */<a name="line.142"></a>
-<span class="sourceLineNo">143</span>    public CommandLine parse(Options options, String[] arguments, Properties properties, boolean stopAtNonOption)<a name="line.143"></a>
-<span class="sourceLineNo">144</span>            throws ParseException<a name="line.144"></a>
-<span class="sourceLineNo">145</span>    {<a name="line.145"></a>
-<span class="sourceLineNo">146</span>        // clear out the data in options in case it's been used before (CLI-71)<a name="line.146"></a>
-<span class="sourceLineNo">147</span>        for (Option opt : options.helpOptions())<a name="line.147"></a>
-<span class="sourceLineNo">148</span>        {<a name="line.148"></a>
-<span class="sourceLineNo">149</span>            opt.clearValues();<a name="line.149"></a>
-<span class="sourceLineNo">150</span>        }<a name="line.150"></a>
-<span class="sourceLineNo">151</span>        <a name="line.151"></a>
-<span class="sourceLineNo">152</span>        // clear the data from the groups<a name="line.152"></a>
-<span class="sourceLineNo">153</span>        for (OptionGroup group : options.getOptionGroups())<a name="line.153"></a>
-<span class="sourceLineNo">154</span>        {<a name="line.154"></a>
-<span class="sourceLineNo">155</span>            group.setSelected(null);<a name="line.155"></a>
-<span class="sourceLineNo">156</span>        }        <a name="line.156"></a>
-<span class="sourceLineNo">157</span><a name="line.157"></a>
-<span class="sourceLineNo">158</span>        // initialise members<a name="line.158"></a>
-<span class="sourceLineNo">159</span>        setOptions(options);<a name="line.159"></a>
-<span class="sourceLineNo">160</span><a name="line.160"></a>
-<span class="sourceLineNo">161</span>        cmd = new CommandLine();<a name="line.161"></a>
+<span class="sourceLineNo">138</span>     * @return the list of atomic option and value tokens<a name="line.138"></a>
+<span class="sourceLineNo">139</span>     *<a name="line.139"></a>
+<span class="sourceLineNo">140</span>     * @throws ParseException if there are any problems encountered<a name="line.140"></a>
+<span class="sourceLineNo">141</span>     * while parsing the command line tokens.<a name="line.141"></a>
+<span class="sourceLineNo">142</span>     *<a name="line.142"></a>
+<span class="sourceLineNo">143</span>     * @since 1.1<a name="line.143"></a>
+<span class="sourceLineNo">144</span>     */<a name="line.144"></a>
+<span class="sourceLineNo">145</span>    public CommandLine parse(Options options, String[] arguments, Properties properties, boolean stopAtNonOption)<a name="line.145"></a>
+<span class="sourceLineNo">146</span>            throws ParseException<a name="line.146"></a>
+<span class="sourceLineNo">147</span>    {<a name="line.147"></a>
+<span class="sourceLineNo">148</span>        // clear out the data in options in case it's been used before (CLI-71)<a name="line.148"></a>
+<span class="sourceLineNo">149</span>        for (Option opt : options.helpOptions())<a name="line.149"></a>
+<span class="sourceLineNo">150</span>        {<a name="line.150"></a>
+<span class="sourceLineNo">151</span>            opt.clearValues();<a name="line.151"></a>
+<span class="sourceLineNo">152</span>        }<a name="line.152"></a>
+<span class="sourceLineNo">153</span>        <a name="line.153"></a>
+<span class="sourceLineNo">154</span>        // clear the data from the groups<a name="line.154"></a>
+<span class="sourceLineNo">155</span>        for (OptionGroup group : options.getOptionGroups())<a name="line.155"></a>
+<span class="sourceLineNo">156</span>        {<a name="line.156"></a>
+<span class="sourceLineNo">157</span>            group.setSelected(null);<a name="line.157"></a>
+<span class="sourceLineNo">158</span>        }        <a name="line.158"></a>
+<span class="sourceLineNo">159</span><a name="line.159"></a>
+<span class="sourceLineNo">160</span>        // initialise members<a name="line.160"></a>
+<span class="sourceLineNo">161</span>        setOptions(options);<a name="line.161"></a>
 <span class="sourceLineNo">162</span><a name="line.162"></a>
-<span class="sourceLineNo">163</span>        boolean eatTheRest = false;<a name="line.163"></a>
+<span class="sourceLineNo">163</span>        cmd = new CommandLine();<a name="line.163"></a>
 <span class="sourceLineNo">164</span><a name="line.164"></a>
-<span class="sourceLineNo">165</span>        if (arguments == null)<a name="line.165"></a>
-<span class="sourceLineNo">166</span>        {<a name="line.166"></a>
-<span class="sourceLineNo">167</span>            arguments = new String[0];<a name="line.167"></a>
-<span class="sourceLineNo">168</span>        }<a name="line.168"></a>
-<span class="sourceLineNo">169</span><a name="line.169"></a>
-<span class="sourceLineNo">170</span>        List&lt;String&gt; tokenList = Arrays.asList(flatten(getOptions(), arguments, stopAtNonOption));<a name="line.170"></a>
+<span class="sourceLineNo">165</span>        boolean eatTheRest = false;<a name="line.165"></a>
+<span class="sourceLineNo">166</span><a name="line.166"></a>
+<span class="sourceLineNo">167</span>        if (arguments == null)<a name="line.167"></a>
+<span class="sourceLineNo">168</span>        {<a name="line.168"></a>
+<span class="sourceLineNo">169</span>            arguments = new String[0];<a name="line.169"></a>
+<span class="sourceLineNo">170</span>        }<a name="line.170"></a>
 <span class="sourceLineNo">171</span><a name="line.171"></a>
-<span class="sourceLineNo">172</span>        ListIterator&lt;String&gt; iterator = tokenList.listIterator();<a name="line.172"></a>
+<span class="sourceLineNo">172</span>        List&lt;String&gt; tokenList = Arrays.asList(flatten(getOptions(), arguments, stopAtNonOption));<a name="line.172"></a>
 <span class="sourceLineNo">173</span><a name="line.173"></a>
-<span class="sourceLineNo">174</span>        // process each flattened token<a name="line.174"></a>
-<span class="sourceLineNo">175</span>        while (iterator.hasNext())<a name="line.175"></a>
-<span class="sourceLineNo">176</span>        {<a name="line.176"></a>
-<span class="sourceLineNo">177</span>            String t = iterator.next();<a name="line.177"></a>
-<span class="sourceLineNo">178</span><a name="line.178"></a>
-<span class="sourceLineNo">179</span>            // the value is the double-dash<a name="line.179"></a>
-<span class="sourceLineNo">180</span>            if ("--".equals(t))<a name="line.180"></a>
-<span class="sourceLineNo">181</span>            {<a name="line.181"></a>
-<span class="sourceLineNo">182</span>                eatTheRest = true;<a name="line.182"></a>
-<span class="sourceLineNo">183</span>            }<a name="line.183"></a>
-<span class="sourceLineNo">184</span><a name="line.184"></a>
-<span class="sourceLineNo">185</span>            // the value is a single dash<a name="line.185"></a>
-<span class="sourceLineNo">186</span>            else if ("-".equals(t))<a name="line.186"></a>
-<span class="sourceLineNo">187</span>            {<a name="line.187"></a>
-<span class="sourceLineNo">188</span>                if (stopAtNonOption)<a name="line.188"></a>
-<span class="sourceLineNo">189</span>                {<a name="line.189"></a>
-<span class="sourceLineNo">190</span>                    eatTheRest = true;<a name="line.190"></a>
-<span class="sourceLineNo">191</span>                }<a name="line.191"></a>
-<span class="sourceLineNo">192</span>                else<a name="line.192"></a>
-<span class="sourceLineNo">193</span>                {<a name="line.193"></a>
-<span class="sourceLineNo">194</span>                    cmd.addArg(t);<a name="line.194"></a>
-<span class="sourceLineNo">195</span>                }<a name="line.195"></a>
-<span class="sourceLineNo">196</span>            }<a name="line.196"></a>
-<span class="sourceLineNo">197</span><a name="line.197"></a>
-<span class="sourceLineNo">198</span>            // the value is an option<a name="line.198"></a>
-<span class="sourceLineNo">199</span>            else if (t.startsWith("-"))<a name="line.199"></a>
-<span class="sourceLineNo">200</span>            {<a name="line.200"></a>
-<span class="sourceLineNo">201</span>                if (stopAtNonOption &amp;&amp; !getOptions().hasOption(t))<a name="line.201"></a>
-<span class="sourceLineNo">202</span>                {<a name="line.202"></a>
-<span class="sourceLineNo">203</span>                    eatTheRest = true;<a name="line.203"></a>
-<span class="sourceLineNo">204</span>                    cmd.addArg(t);<a name="line.204"></a>
-<span class="sourceLineNo">205</span>                }<a name="line.205"></a>
-<span class="sourceLineNo">206</span>                else<a name="line.206"></a>
-<span class="sourceLineNo">207</span>                {<a name="line.207"></a>
-<span class="sourceLineNo">208</span>                    processOption(t, iterator);<a name="line.208"></a>
-<span class="sourceLineNo">209</span>                }<a name="line.209"></a>
-<span class="sourceLineNo">210</span>            }<a name="line.210"></a>
-<span class="sourceLineNo">211</span><a name="line.211"></a>
-<span class="sourceLineNo">212</span>            // the value is an argument<a name="line.212"></a>
-<span class="sourceLineNo">213</span>            else<a name="line.213"></a>
-<span class="sourceLineNo">214</span>            {<a name="line.214"></a>
-<span class="sourceLineNo">215</span>                cmd.addArg(t);<a name="line.215"></a>
-<span class="sourceLineNo">216</span><a name="line.216"></a>
-<span class="sourceLineNo">217</span>                if (stopAtNonOption)<a name="line.217"></a>
-<span class="sourceLineNo">218</span>                {<a name="line.218"></a>
-<span class="sourceLineNo">219</span>                    eatTheRest = true;<a name="line.219"></a>
-<span class="sourceLineNo">220</span>                }<a name="line.220"></a>
-<span class="sourceLineNo">221</span>            }<a name="line.221"></a>
-<span class="sourceLineNo">222</span><a name="line.222"></a>
-<span class="sourceLineNo">223</span>            // eat the remaining tokens<a name="line.223"></a>
-<span class="sourceLineNo">224</span>            if (eatTheRest)<a name="line.224"></a>
-<span class="sourceLineNo">225</span>            {<a name="line.225"></a>
-<span class="sourceLineNo">226</span>                while (iterator.hasNext())<a name="line.226"></a>
-<span class="sourceLineNo">227</span>                {<a name="line.227"></a>
-<span class="sourceLineNo">228</span>                    String str = iterator.next();<a name="line.228"></a>
-<span class="sourceLineNo">229</span><a name="line.229"></a>
-<span class="sourceLineNo">230</span>                    // ensure only one double-dash is added<a name="line.230"></a>
-<span class="sourceLineNo">231</span>                    if (!"--".equals(str))<a name="line.231"></a>
-<span class="sourceLineNo">232</span>                    {<a name="line.232"></a>
-<span class="sourceLineNo">233</span>                        cmd.addArg(str);<a name="line.233"></a>
-<span class="sourceLineNo">234</span>                    }<a name="line.234"></a>
-<span class="sourceLineNo">235</span>                }<a name="line.235"></a>
-<span class="sourceLineNo">236</span>            }<a name="line.236"></a>
-<span class="sourceLineNo">237</span>        }<a name="line.237"></a>
-<span class="sourceLineNo">238</span><a name="line.238"></a>
-<span class="sourceLineNo">239</span>        processProperties(properties);<a name="line.239"></a>
-<span class="sourceLineNo">240</span>        checkRequiredOptions();<a name="line.240"></a>
-<span class="sourceLineNo">241</span><a name="line.241"></a>
-<span class="sourceLineNo">242</span>        return cmd;<a name="line.242"></a>
-<span class="sourceLineNo">243</span>    }<a name="line.243"></a>
-<span class="sourceLineNo">244</span><a name="line.244"></a>
-<span class="sourceLineNo">245</span>    /**<a name="line.245"></a>
-<span class="sourceLineNo">246</span>     * Sets the values of Options using the values in &lt;code&gt;properties&lt;/code&gt;.<a name="line.246"></a>
-<span class="sourceLineNo">247</span>     *<a name="line.247"></a>
-<span class="sourceLineNo">248</span>     * @param properties The value properties to be processed.<a name="line.248"></a>
-<span class="sourceLineNo">249</span>     */<a name="line.249"></a>
-<span class="sourceLineNo">250</span>    protected void processProperties(Properties properties) throws ParseException<a name="line.250"></a>
-<span class="sourceLineNo">251</span>    {<a name="line.251"></a>
-<span class="sourceLineNo">252</span>        if (properties == null)<a name="line.252"></a>
-<span class="sourceLineNo">253</span>        {<a name="line.253"></a>
-<span class="sourceLineNo">254</span>            return;<a name="line.254"></a>
-<span class="sourceLineNo">255</span>        }<a name="line.255"></a>
-<span class="sourceLineNo">256</span><a name="line.256"></a>
-<span class="sourceLineNo">257</span>        for (Enumeration&lt;?&gt; e = properties.propertyNames(); e.hasMoreElements();)<a name="line.257"></a>
-<span class="sourceLineNo">258</span>        {<a name="line.258"></a>
-<span class="sourceLineNo">259</span>            String option = e.nextElement().toString();<a name="line.259"></a>
-<span class="sourceLineNo">260</span>            <a name="line.260"></a>
-<span class="sourceLineNo">261</span>            Option opt = options.getOption(option);<a name="line.261"></a>
-<span class="sourceLineNo">262</span>            if (opt == null)<a name="line.262"></a>
-<span class="sourceLineNo">263</span>            {<a name="line.263"></a>
-<span class="sourceLineNo">264</span>                throw new UnrecognizedOptionException("Default option wasn't defined", option);<a name="line.264"></a>
-<span class="sourceLineNo">265</span>            }<a name="line.265"></a>
-<span class="sourceLineNo">266</span>            <a name="line.266"></a>
-<span class="sourceLineNo">267</span>            // if the option is part of a group, check if another option of the group has been selected<a name="line.267"></a>
-<span class="sourceLineNo">268</span>            OptionGroup group = options.getOptionGroup(opt);<a name="line.268"></a>
-<span class="sourceLineNo">269</span>            boolean selected = group != null &amp;&amp; group.getSelected() != null;<a name="line.269"></a>
+<span class="sourceLineNo">174</span>        ListIterator&lt;String&gt; iterator = tokenList.listIterator();<a name="line.174"></a>
+<span class="sourceLineNo">175</span><a name="line.175"></a>
+<span class="sourceLineNo">176</span>        // process each flattened token<a name="line.176"></a>
+<span class="sourceLineNo">177</span>        while (iterator.hasNext())<a name="line.177"></a>
+<span class="sourceLineNo">178</span>        {<a name="line.178"></a>
+<span class="sourceLineNo">179</span>            String t = iterator.next();<a name="line.179"></a>
+<span class="sourceLineNo">180</span><a name="line.180"></a>
+<span class="sourceLineNo">181</span>            // the value is the double-dash<a name="line.181"></a>
+<span class="sourceLineNo">182</span>            if ("--".equals(t))<a name="line.182"></a>
+<span class="sourceLineNo">183</span>            {<a name="line.183"></a>
+<span class="sourceLineNo">184</span>                eatTheRest = true;<a name="line.184"></a>
+<span class="sourceLineNo">185</span>            }<a name="line.185"></a>
+<span class="sourceLineNo">186</span><a name="line.186"></a>
+<span class="sourceLineNo">187</span>            // the value is a single dash<a name="line.187"></a>
+<span class="sourceLineNo">188</span>            else if ("-".equals(t))<a name="line.188"></a>
+<span class="sourceLineNo">189</span>            {<a name="line.189"></a>
+<span class="sourceLineNo">190</span>                if (stopAtNonOption)<a name="line.190"></a>
+<span class="sourceLineNo">191</span>                {<a name="line.191"></a>
+<span class="sourceLineNo">192</span>                    eatTheRest = true;<a name="line.192"></a>
+<span class="sourceLineNo">193</span>                }<a name="line.193"></a>
+<span class="sourceLineNo">194</span>                else<a name="line.194"></a>
+<span class="sourceLineNo">195</span>                {<a name="line.195"></a>
+<span class="sourceLineNo">196</span>                    cmd.addArg(t);<a name="line.196"></a>
+<span class="sourceLineNo">197</span>                }<a name="line.197"></a>
+<span class="sourceLineNo">198</span>            }<a name="line.198"></a>
+<span class="sourceLineNo">199</span><a name="line.199"></a>
+<span class="sourceLineNo">200</span>            // the value is an option<a name="line.200"></a>
+<span class="sourceLineNo">201</span>            else if (t.startsWith("-"))<a name="line.201"></a>
+<span class="sourceLineNo">202</span>            {<a name="line.202"></a>
+<span class="sourceLineNo">203</span>                if (stopAtNonOption &amp;&amp; !getOptions().hasOption(t))<a name="line.203"></a>
+<span class="sourceLineNo">204</span>                {<a name="line.204"></a>
+<span class="sourceLineNo">205</span>                    eatTheRest = true;<a name="line.205"></a>
+<span class="sourceLineNo">206</span>                    cmd.addArg(t);<a name="line.206"></a>
+<span class="sourceLineNo">207</span>                }<a name="line.207"></a>
+<span class="sourceLineNo">208</span>                else<a name="line.208"></a>
+<span class="sourceLineNo">209</span>                {<a name="line.209"></a>
+<span class="sourceLineNo">210</span>                    processOption(t, iterator);<a name="line.210"></a>
+<span class="sourceLineNo">211</span>                }<a name="line.211"></a>
+<span class="sourceLineNo">212</span>            }<a name="line.212"></a>
+<span class="sourceLineNo">213</span><a name="line.213"></a>
+<span class="sourceLineNo">214</span>            // the value is an argument<a name="line.214"></a>
+<span class="sourceLineNo">215</span>            else<a name="line.215"></a>
+<span class="sourceLineNo">216</span>            {<a name="line.216"></a>
+<span class="sourceLineNo">217</span>                cmd.addArg(t);<a name="line.217"></a>
+<span class="sourceLineNo">218</span><a name="line.218"></a>
+<span class="sourceLineNo">219</span>                if (stopAtNonOption)<a name="line.219"></a>
+<span class="sourceLineNo">220</span>                {<a name="line.220"></a>
+<span class="sourceLineNo">221</span>                    eatTheRest = true;<a name="line.221"></a>
+<span class="sourceLineNo">222</span>                }<a name="line.222"></a>
+<span class="sourceLineNo">223</span>            }<a name="line.223"></a>
+<span class="sourceLineNo">224</span><a name="line.224"></a>
+<span class="sourceLineNo">225</span>            // eat the remaining tokens<a name="line.225"></a>
+<span class="sourceLineNo">226</span>            if (eatTheRest)<a name="line.226"></a>
+<span class="sourceLineNo">227</span>            {<a name="line.227"></a>
+<span class="sourceLineNo">228</span>                while (iterator.hasNext())<a name="line.228"></a>
+<span class="sourceLineNo">229</span>                {<a name="line.229"></a>
+<span class="sourceLineNo">230</span>                    String str = iterator.next();<a name="line.230"></a>
+<span class="sourceLineNo">231</span><a name="line.231"></a>
+<span class="sourceLineNo">232</span>                    // ensure only one double-dash is added<a name="line.232"></a>
+<span class="sourceLineNo">233</span>                    if (!"--".equals(str))<a name="line.233"></a>
+<span class="sourceLineNo">234</span>                    {<a name="line.234"></a>
+<span class="sourceLineNo">235</span>                        cmd.addArg(str);<a name="line.235"></a>
+<span class="sourceLineNo">236</span>                    }<a name="line.236"></a>
+<span class="sourceLineNo">237</span>                }<a name="line.237"></a>
+<span class="sourceLineNo">238</span>            }<a name="line.238"></a>
+<span class="sourceLineNo">239</span>        }<a name="line.239"></a>
+<span class="sourceLineNo">240</span><a name="line.240"></a>
+<span class="sourceLineNo">241</span>        processProperties(properties);<a name="line.241"></a>
+<span class="sourceLineNo">242</span>        checkRequiredOptions();<a name="line.242"></a>
+<span class="sourceLineNo">243</span><a name="line.243"></a>
+<span class="sourceLineNo">244</span>        return cmd;<a name="line.244"></a>
+<span class="sourceLineNo">245</span>    }<a name="line.245"></a>
+<span class="sourceLineNo">246</span><a name="line.246"></a>
+<span class="sourceLineNo">247</span>    /**<a name="line.247"></a>
+<span class="sourceLineNo">248</span>     * Sets the values of Options using the values in &lt;code&gt;properties&lt;/code&gt;.<a name="line.248"></a>
+<span class="sourceLineNo">249</span>     *<a name="line.249"></a>
+<span class="sourceLineNo">250</span>     * @param properties The value properties to be processed.<a name="line.250"></a>
+<span class="sourceLineNo">251</span>     * @throws ParseException if there are any problems encountered<a name="line.251"></a>
+<span class="sourceLineNo">252</span>     *                        while processing the properties.<a name="line.252"></a>
+<span class="sourceLineNo">253</span>     */<a name="line.253"></a>
+<span class="sourceLineNo">254</span>    protected void processProperties(Properties properties) throws ParseException<a name="line.254"></a>
+<span class="sourceLineNo">255</span>    {<a name="line.255"></a>
+<span class="sourceLineNo">256</span>        if (properties == null)<a name="line.256"></a>
+<span class="sourceLineNo">257</span>        {<a name="line.257"></a>
+<span class="sourceLineNo">258</span>            return;<a name="line.258"></a>
+<span class="sourceLineNo">259</span>        }<a name="line.259"></a>
+<span class="sourceLineNo">260</span><a name="line.260"></a>
+<span class="sourceLineNo">261</span>        for (Enumeration&lt;?&gt; e = properties.propertyNames(); e.hasMoreElements();)<a name="line.261"></a>
+<span class="sourceLineNo">262</span>        {<a name="line.262"></a>
+<span class="sourceLineNo">263</span>            String option = e.nextElement().toString();<a name="line.263"></a>
+<span class="sourceLineNo">264</span>            <a name="line.264"></a>
+<span class="sourceLineNo">265</span>            Option opt = options.getOption(option);<a name="line.265"></a>
+<span class="sourceLineNo">266</span>            if (opt == null)<a name="line.266"></a>
+<span class="sourceLineNo">267</span>            {<a name="line.267"></a>
+<span class="sourceLineNo">268</span>                throw new UnrecognizedOptionException("Default option wasn't defined", option);<a name="line.268"></a>
+<span class="sourceLineNo">269</span>            }<a name="line.269"></a>
 <span class="sourceLineNo">270</span>            <a name="line.270"></a>
-<span class="sourceLineNo">271</span>            if (!cmd.hasOption(option) &amp;&amp; !selected)<a name="line.271"></a>
-<span class="sourceLineNo">272</span>            {<a name="line.272"></a>
-<span class="sourceLineNo">273</span>                // get the value from the properties instance<a name="line.273"></a>
-<span class="sourceLineNo">274</span>                String value = properties.getProperty(option);<a name="line.274"></a>
-<span class="sourceLineNo">275</span><a name="line.275"></a>
-<span class="sourceLineNo">276</span>                if (opt.hasArg())<a name="line.276"></a>
-<span class="sourceLineNo">277</span>                {<a name="line.277"></a>
-<span class="sourceLineNo">278</span>                    if (opt.getValues() == null || opt.getValues().length == 0)<a name="line.278"></a>
-<span class="sourceLineNo">279</span>                    {<a name="line.279"></a>
-<span class="sourceLineNo">280</span>                        try<a name="line.280"></a>
-<span class="sourceLineNo">281</span>                        {<a name="line.281"></a>
-<span class="sourceLineNo">282</span>                            opt.addValueForProcessing(value);<a name="line.282"></a>
-<span class="sourceLineNo">283</span>                        }<a name="line.283"></a>
-<span class="sourceLineNo">284</span>                        catch (RuntimeException exp) //NOPMD<a name="line.284"></a>
+<span class="sourceLineNo">271</span>            // if the option is part of a group, check if another option of the group has been selected<a name="line.271"></a>
+<span class="sourceLineNo">272</span>            OptionGroup group = options.getOptionGroup(opt);<a name="line.272"></a>
+<span class="sourceLineNo">273</span>            boolean selected = group != null &amp;&amp; group.getSelected() != null;<a name="line.273"></a>
+<span class="sourceLineNo">274</span>            <a name="line.274"></a>
+<span class="sourceLineNo">275</span>            if (!cmd.hasOption(option) &amp;&amp; !selected)<a name="line.275"></a>
+<span class="sourceLineNo">276</span>            {<a name="line.276"></a>
+<span class="sourceLineNo">277</span>                // get the value from the properties instance<a name="line.277"></a>
+<span class="sourceLineNo">278</span>                String value = properties.getProperty(option);<a name="line.278"></a>
+<span class="sourceLineNo">279</span><a name="line.279"></a>
+<span class="sourceLineNo">280</span>                if (opt.hasArg())<a name="line.280"></a>
+<span class="sourceLineNo">281</span>                {<a name="line.281"></a>
+<span class="sourceLineNo">282</span>                    if (opt.getValues() == null || opt.getValues().length == 0)<a name="line.282"></a>
+<span class="sourceLineNo">283</span>                    {<a name="line.283"></a>
+<span class="sourceLineNo">284</span>                        try<a name="line.284"></a>
 <span class="sourceLineNo">285</span>                        {<a name="line.285"></a>
-<span class="sourceLineNo">286</span>                            // if we cannot add the value don't worry about it<a name="line.286"></a>
+<span class="sourceLineNo">286</span>                            opt.addValueForProcessing(value);<a name="line.286"></a>
 <span class="sourceLineNo">287</span>                        }<a name="line.287"></a>
-<span class="sourceLineNo">288</span>                    }<a name="line.288"></a>
-<span class="sourceLineNo">289</span>                }<a name="line.289"></a>
-<span class="sourceLineNo">290</span>                else if (!("yes".equalsIgnoreCase(value)<a name="line.290"></a>
-<span class="sourceLineNo">291</span>                        || "true".equalsIgnoreCase(value)<a name="line.291"></a>
-<span class="sourceLineNo">292</span>                        || "1".equalsIgnoreCase(value)))<a name="line.292"></a>
-<span class="sourceLineNo">293</span>                {<a name="line.293"></a>
-<span class="sourceLineNo">294</span>                    // if the value is not yes, true or 1 then don't add the<a name="line.294"></a>
-<span class="sourceLineNo">295</span>                    // option to the CommandLine<a name="line.295"></a>
-<span class="sourceLineNo">296</span>                    continue;<a name="line.296"></a>
-<span class="sourceLineNo">297</span>                }<a name="line.297"></a>
-<span class="sourceLineNo">298</span><a name="line.298"></a>
-<span class="sourceLineNo">299</span>                cmd.addOption(opt);<a name="line.299"></a>
-<span class="sourceLineNo">300</span>                updateRequiredOptions(opt);<a name="line.300"></a>
-<span class="sourceLineNo">301</span>            }<a name="line.301"></a>
-<span class="sourceLineNo">302</span>        }<a name="line.302"></a>
-<span class="sourceLineNo">303</span>    }<a name="line.303"></a>
-<span class="sourceLineNo">304</span><a name="line.304"></a>
-<span class="sourceLineNo">305</span>    /**<a name="line.305"></a>
-<span class="sourceLineNo">306</span>     * Throws a {@link MissingOptionException} if all of the required options<a name="line.306"></a>
-<span class="sourceLineNo">307</span>     * are not present.<a name="line.307"></a>
-<span class="sourceLineNo">308</span>     *<a name="line.308"></a>
-<span class="sourceLineNo">309</span>     * @throws MissingOptionException if any of the required Options are not present.<a name="line.309"></a>
-<span class="sourceLineNo">310</span>     */<a name="line.310"></a>
-<span class="sourceLineNo">311</span>    protected void checkRequiredOptions() throws MissingOptionException<a name="line.311"></a>
-<span class="sourceLineNo">312</span>    {<a name="line.312"></a>
-<span class="sourceLineNo">313</span>        // if there are required options that have not been processed<a name="line.313"></a>
-<span class="sourceLineNo">314</span>        if (!getRequiredOptions().isEmpty())<a name="line.314"></a>
-<span class="sourceLineNo">315</span>        {<a name="line.315"></a>
-<span class="sourceLineNo">316</span>            throw new MissingOptionException(getRequiredOptions());<a name="line.316"></a>
-<span class="sourceLineNo">317</span>        }<a name="line.317"></a>
-<span class="sourceLineNo">318</span>    }<a name="line.318"></a>
-<span class="sourceLineNo">319</span><a name="line.319"></a>
-<span class="sourceLineNo">320</span>    /**<a name="line.320"></a>
-<span class="sourceLineNo">321</span>     * Process the argument values for the specified Option<a name="line.321"></a>
-<span class="sourceLineNo">322</span>     * &lt;code&gt;opt&lt;/code&gt; using the values retrieved from the<a name="line.322"></a>
-<span class="sourceLineNo">323</span>     * specified iterator &lt;code&gt;iter&lt;/code&gt;.<a name="line.323"></a>
-<span class="sourceLineNo">324</span>     *<a name="line.324"></a>
-<span class="sourceLineNo">325</span>     * @param opt The current Option<a name="line.325"></a>
-<span class="sourceLineNo">326</span>     * @param iter The iterator over the flattened command line Options.<a name="line.326"></a>
-<span class="sourceLineNo">327</span>     *<a name="line.327"></a>
-<span class="sourceLineNo">328</span>     * @throws ParseException if an argument value is required<a name="line.328"></a>
-<span class="sourceLineNo">329</span>     * and it is has not been found.<a name="line.329"></a>
-<span class="sourceLineNo">330</span>     */<a name="line.330"></a>
-<span class="sourceLineNo">331</span>    public void processArgs(Option opt, ListIterator&lt;String&gt; iter) throws ParseException<a name="line.331"></a>
-<span class="sourceLineNo">332</span>    {<a name="line.332"></a>
-<span class="sourceLineNo">333</span>        // loop until an option is found<a name="line.333"></a>
-<span class="sourceLineNo">334</span>        while (iter.hasNext())<a name="line.334"></a>
-<span class="sourceLineNo">335</span>        {<a name="line.335"></a>
-<span class="sourceLineNo">336</span>            String str = iter.next();<a name="line.336"></a>
-<span class="sourceLineNo">337</span>            <a name="line.337"></a>
-<span class="sourceLineNo">338</span>            // found an Option, not an argument<a name="line.338"></a>
-<span class="sourceLineNo">339</span>            if (getOptions().hasOption(str) &amp;&amp; str.startsWith("-"))<a name="line.339"></a>
-<span class="sourceLineNo">340</span>            {<a name="line.340"></a>
-<span class="sourceLineNo">341</span>                iter.previous();<a name="line.341"></a>
-<span class="sourceLineNo">342</span>                break;<a name="line.342"></a>
-<span class="sourceLineNo">343</span>            }<a name="line.343"></a>
-<span class="sourceLineNo">344</span><a name="line.344"></a>
-<span class="sourceLineNo">345</span>            // found a value<a name="line.345"></a>
-<span class="sourceLineNo">346</span>            try<a name="line.346"></a>
-<span class="sourceLineNo">347</span>            {<a name="line.347"></a>
-<span class="sourceLineNo">348</span>                opt.addValueForProcessing(Util.stripLeadingAndTrailingQuotes(str));<a name="line.348"></a>
-<span class="sourceLineNo">349</span>            }<a name="line.349"></a>
-<span class="sourceLineNo">350</span>            catch (RuntimeException exp)<a name="line.350"></a>
+<span class="sourceLineNo">288</span>                        catch (RuntimeException exp) //NOPMD<a name="line.288"></a>
+<span class="sourceLineNo">289</span>                        {<a name="line.289"></a>
+<span class="sourceLineNo">290</span>                            // if we cannot add the value don't worry about it<a name="line.290"></a>
+<span class="sourceLineNo">291</span>                        }<a name="line.291"></a>
+<span class="sourceLineNo">292</span>                    }<a name="line.292"></a>
+<span class="sourceLineNo">293</span>                }<a name="line.293"></a>
+<span class="sourceLineNo">294</span>                else if (!("yes".equalsIgnoreCase(value)<a name="line.294"></a>
+<span class="sourceLineNo">295</span>                        || "true".equalsIgnoreCase(value)<a name="line.295"></a>
+<span class="sourceLineNo">296</span>                        || "1".equalsIgnoreCase(value)))<a name="line.296"></a>
+<span class="sourceLineNo">297</span>                {<a name="line.297"></a>
+<span class="sourceLineNo">298</span>                    // if the value is not yes, true or 1 then don't add the<a name="line.298"></a>
+<span class="sourceLineNo">299</span>                    // option to the CommandLine<a name="line.299"></a>
+<span class="sourceLineNo">300</span>                    continue;<a name="line.300"></a>
+<span class="sourceLineNo">301</span>                }<a name="line.301"></a>
+<span class="sourceLineNo">302</span><a name="line.302"></a>
+<span class="sourceLineNo">303</span>                cmd.addOption(opt);<a name="line.303"></a>
+<span class="sourceLineNo">304</span>                updateRequiredOptions(opt);<a name="line.304"></a>
+<span class="sourceLineNo">305</span>            }<a name="line.305"></a>
+<span class="sourceLineNo">306</span>        }<a name="line.306"></a>
+<span class="sourceLineNo">307</span>    }<a name="line.307"></a>
+<span class="sourceLineNo">308</span><a name="line.308"></a>
+<span class="sourceLineNo">309</span>    /**<a name="line.309"></a>
+<span class="sourceLineNo">310</span>     * Throws a {@link MissingOptionException} if all of the required options<a name="line.310"></a>
+<span class="sourceLineNo">311</span>     * are not present.<a name="line.311"></a>
+<span class="sourceLineNo">312</span>     *<a name="line.312"></a>
+<span class="sourceLineNo">313</span>     * @throws MissingOptionException if any of the required Options are not present.<a name="line.313"></a>
+<span class="sourceLineNo">314</span>     */<a name="line.314"></a>
+<span class="sourceLineNo">315</span>    protected void checkRequiredOptions() throws MissingOptionException<a name="line.315"></a>
+<span class="sourceLineNo">316</span>    {<a name="line.316"></a>
+<span class="sourceLineNo">317</span>        // if there are required options that have not been processed<a name="line.317"></a>
+<span class="sourceLineNo">318</span>        if (!getRequiredOptions().isEmpty())<a name="line.318"></a>
+<span class="sourceLineNo">319</span>        {<a name="line.319"></a>
+<span class="sourceLineNo">320</span>            throw new MissingOptionException(getRequiredOptions());<a name="line.320"></a>
+<span class="sourceLineNo">321</span>        }<a name="line.321"></a>
+<span class="sourceLineNo">322</span>    }<a name="line.322"></a>
+<span class="sourceLineNo">323</span><a name="line.323"></a>
+<span class="sourceLineNo">324</span>    /**<a name="line.324"></a>
+<span class="sourceLineNo">325</span>     * Process the argument values for the specified Option<a name="line.325"></a>
+<span class="sourceLineNo">326</span>     * &lt;code&gt;opt&lt;/code&gt; using the values retrieved from the<a name="line.326"></a>
+<span class="sourceLineNo">327</span>     * specified iterator &lt;code&gt;iter&lt;/code&gt;.<a name="line.327"></a>
+<span class="sourceLineNo">328</span>     *<a name="line.328"></a>
+<span class="sourceLineNo">329</span>     * @param opt The current Option<a name="line.329"></a>
+<span class="sourceLineNo">330</span>     * @param iter The iterator over the flattened command line Options.<a name="line.330"></a>
+<span class="sourceLineNo">331</span>     *<a name="line.331"></a>
+<span class="sourceLineNo">332</span>     * @throws ParseException if an argument value is required<a name="line.332"></a>
+<span class="sourceLineNo">333</span>     * and it is has not been found.<a name="line.333"></a>
+<span class="sourceLineNo">334</span>     */<a name="line.334"></a>
+<span class="sourceLineNo">335</span>    public void processArgs(Option opt, ListIterator&lt;String&gt; iter) throws ParseException<a name="line.335"></a>
+<span class="sourceLineNo">336</span>    {<a name="line.336"></a>
+<span class="sourceLineNo">337</span>        // loop until an option is found<a name="line.337"></a>
+<span class="sourceLineNo">338</span>        while (iter.hasNext())<a name="line.338"></a>
+<span class="sourceLineNo">339</span>        {<a name="line.339"></a>
+<span class="sourceLineNo">340</span>            String str = iter.next();<a name="line.340"></a>
+<span class="sourceLineNo">341</span>            <a name="line.341"></a>
+<span class="sourceLineNo">342</span>            // found an Option, not an argument<a name="line.342"></a>
+<span class="sourceLineNo">343</span>            if (getOptions().hasOption(str) &amp;&amp; str.startsWith("-"))<a name="line.343"></a>
+<span class="sourceLineNo">344</span>            {<a name="line.344"></a>
+<span class="sourceLineNo">345</span>                iter.previous();<a name="line.345"></a>
+<span class="sourceLineNo">346</span>                break;<a name="line.346"></a>
+<span class="sourceLineNo">347</span>            }<a name="line.347"></a>
+<span class="sourceLineNo">348</span><a name="line.348"></a>
+<span class="sourceLineNo">349</span>            // found a value<a name="line.349"></a>
+<span class="sourceLineNo">350</span>            try<a name="line.350"></a>
 <span class="sourceLineNo">351</span>            {<a name="line.351"></a>
-<span class="sourceLineNo">352</span>                iter.previous();<a name="line.352"></a>
-<span class="sourceLineNo">353</span>                break;<a name="line.353"></a>
-<span class="sourceLineNo">354</span>            }<a name="line.354"></a>
-<span class="sourceLineNo">355</span>        }<a name="line.355"></a>
-<span class="sourceLineNo">356</span><a name="line.356"></a>
-<span class="sourceLineNo">357</span>        if (opt.getValues() == null &amp;&amp; !opt.hasOptionalArg())<a name="line.357"></a>
-<span class="sourceLineNo">358</span>        {<a name="line.358"></a>
-<span class="sourceLineNo">359</span>            throw new MissingArgumentException(opt);<a name="line.359"></a>
-<span class="sourceLineNo">360</span>        }<a name="line.360"></a>
-<span class="sourceLineNo">361</span>    }<a name="line.361"></a>
-<span class="sourceLineNo">362</span><a name="line.362"></a>
-<span class="sourceLineNo">363</span>    /**<a name="line.363"></a>
-<span class="sourceLineNo">364</span>     * Process the Option specified by &lt;code&gt;arg&lt;/code&gt; using the values<a name="line.364"></a>
-<span class="sourceLineNo">365</span>     * retrieved from the specified iterator &lt;code&gt;iter&lt;/code&gt;.<a name="line.365"></a>
-<span class="sourceLineNo">366</span>     *<a name="line.366"></a>
-<span class="sourceLineNo">367</span>     * @param arg The String value representing an Option<a name="line.367"></a>
-<span class="sourceLineNo">368</span>     * @param iter The iterator over the flattened command line arguments.<a name="line.368"></a>
-<span class="sourceLineNo">369</span>     *<a name="line.369"></a>
-<span class="sourceLineNo">370</span>     * @throws ParseException if &lt;code&gt;arg&lt;/code&gt; does not represent an Option<a name="line.370"></a>
-<span class="sourceLineNo">371</span>     */<a name="line.371"></a>
-<span class="sourceLineNo">372</span>    protected void processOption(String arg, ListIterator&lt;String&gt; iter) throws ParseException<a name="line.372"></a>
-<span class="sourceLineNo">373</span>    {<a name="line.373"></a>
-<span class="sourceLineNo">374</span>        boolean hasOption = getOptions().hasOption(arg);<a name="line.374"></a>
-<span class="sourceLineNo">375</span><a name="line.375"></a>
-<span class="sourceLineNo">376</span>        // if there is no option throw an UnrecognisedOptionException<a name="line.376"></a>
-<span class="sourceLineNo">377</span>        if (!hasOption)<a name="line.377"></a>
-<span class="sourceLineNo">378</span>        {<a name="line.378"></a>
-<span class="sourceLineNo">379</span>            throw new UnrecognizedOptionException("Unrecognized option: " + arg, arg);<a name="line.379"></a>
-<span class="sourceLineNo">380</span>        }<a name="line.380"></a>
-<span class="sourceLineNo">381</span><a name="line.381"></a>
-<span class="sourceLineNo">382</span>        // get the option represented by arg<a name="line.382"></a>
-<span class="sourceLineNo">383</span>        Option opt = (Option) getOptions().getOption(arg).clone();<a name="line.383"></a>
-<span class="sourceLineNo">384</span>        <a name="line.384"></a>
-<span class="sourceLineNo">385</span>        // update the required options and groups<a name="line.385"></a>
-<span class="sourceLineNo">386</span>        updateRequiredOptions(opt);<a name="line.386"></a>
-<span class="sourceLineNo">387</span>        <a name="line.387"></a>
-<span class="sourceLineNo">388</span>        // if the option takes an argument value<a name="line.388"></a>
-<span class="sourceLineNo">389</span>        if (opt.hasArg())<a name="line.389"></a>
-<span class="sourceLineNo">390</span>        {<a name="line.390"></a>
-<span class="sourceLineNo">391</span>            processArgs(opt, iter);<a name="line.391"></a>
-<span class="sourceLineNo">392</span>        }<a name="line.392"></a>
-<span class="sourceLineNo">393</span>        <a name="line.393"></a>
-<span class="sourceLineNo">394</span>        // set the option on the command line<a name="line.394"></a>
-<span class="sourceLineNo">395</span>        cmd.addOption(opt);<a name="line.395"></a>
-<span class="sourceLineNo">396</span>    }<a name="line.396"></a>
-<span class="sourceLineNo">397</span><a name="line.397"></a>
-<span class="sourceLineNo">398</span>    /**<a name="line.398"></a>
-<span class="sourceLineNo">399</span>     * Removes the option or its group from the list of expected elements.<a name="line.399"></a>
-<span class="sourceLineNo">400</span>     * <a name="line.400"></a>
-<span class="sourceLineNo">401</span>     * @param opt<a name="line.401"></a>
-<span class="sourceLineNo">402</span>     */<a name="line.402"></a>
-<span class="sourceLineNo">403</span>    private void updateRequiredOptions(Option opt) throws ParseException<a name="line.403"></a>
-<span class="sourceLineNo">404</span>    {<a name="line.404"></a>
-<span class="sourceLineNo">405</span>        // if the option is a required option remove the option from<a name="line.405"></a>
-<span class="sourceLineNo">406</span>        // the requiredOptions list<a name="line.406"></a>
-<span class="sourceLineNo">407</span>        if (opt.isRequired())<a name="line.407"></a>
-<span class="sourceLineNo">408</span>        {<a name="line.408"></a>
-<span class="sourceLineNo">409</span>            getRequiredOptions().remove(opt.getKey());<a name="line.409"></a>
-<span class="sourceLineNo">410</span>        }<a name="line.410"></a>
-<span class="sourceLineNo">411</span><a name="line.411"></a>
-<span class="sourceLineNo">412</span>        // if the option is in an OptionGroup make that option the selected<a name="line.412"></a>
-<span class="sourceLineNo">413</span>        // option of the group<a name="line.413"></a>
-<span class="sourceLineNo">414</span>        if (getOptions().getOptionGroup(opt) != null)<a name="line.414"></a>
-<span class="sourceLineNo">415</span>        {<a name="line.415"></a>
-<span class="sourceLineNo">416</span>            OptionGroup group = getOptions().getOptionGroup(opt);<a name="line.416"></a>
-<span class="sourceLineNo">417</span><a name="line.417"></a>
-<span class="sourceLineNo">418</span>            if (group.isRequired())<a name="line.418"></a>
-<span class="sourceLineNo">419</span>            {<a name="line.419"></a>
-<span class="sourceLineNo">420</span>                getRequiredOptions().remove(group);<a name="line.420"></a>
-<span class="sourceLineNo">421</span>            }<a name="line.421"></a>
-<span class="sourceLineNo">422</span><a name="line.422"></a>
-<span class="sourceLineNo">423</span>            group.setSelected(opt);<a name="line.423"></a>
-<span class="sourceLineNo">424</span>        }<a name="line.424"></a>
-<span class="sourceLineNo">425</span>    }<a name="line.425"></a>
-<span class="sourceLineNo">426</span>}<a name="line.426"></a>
+<span class="sourceLineNo">352</span>                opt.addValueForProcessing(Util.stripLeadingAndTrailingQuotes(str));<a name="line.352"></a>
+<span class="sourceLineNo">353</span>            }<a name="line.353"></a>
+<span class="sourceLineNo">354</span>            catch (RuntimeException exp)<a name="line.354"></a>
+<span class="sourceLineNo">355</span>            {<a name="line.355"></a>
+<span class="sourceLineNo">356</span>                iter.previous();<a name="line.356"></a>
+<span class="sourceLineNo">357</span>                break;<a name="line.357"></a>
+<span class="sourceLineNo">358</span>            }<a name="line.358"></a>
+<span class="sourceLineNo">359</span>        }<a name="line.359"></a>
+<span class="sourceLineNo">360</span><a name="line.360"></a>
+<span class="sourceLineNo">361</span>        if (opt.getValues() == null &amp;&amp; !opt.hasOptionalArg())<a name="line.361"></a>
+<span class="sourceLineNo">362</span>        {<a name="line.362"></a>
+<span class="sourceLineNo">363</span>            throw new MissingArgumentException(opt);<a name="line.363"></a>
+<span class="sourceLineNo">364</span>        }<a name="line.364"></a>
+<span class="sourceLineNo">365</span>    }<a name="line.365"></a>
+<span class="sourceLineNo">366</span><a name="line.366"></a>
+<span class="sourceLineNo">367</span>    /**<a name="line.367"></a>
+<span class="sourceLineNo">368</span>     * Process the Option specified by &lt;code&gt;arg&lt;/code&gt; using the values<a name="line.368"></a>
+<span class="sourceLineNo">369</span>     * retrieved from the specified iterator &lt;code&gt;iter&lt;/code&gt;.<a name="line.369"></a>
+<span class="sourceLineNo">370</span>     *<a name="line.370"></a>
+<span class="sourceLineNo">371</span>     * @param arg The String value representing an Option<a name="line.371"></a>
+<span class="sourceLineNo">372</span>     * @param iter The iterator over the flattened command line arguments.<a name="line.372"></a>
+<span class="sourceLineNo">373</span>     *<a name="line.373"></a>
+<span class="sourceLineNo">374</span>     * @throws ParseException if &lt;code&gt;arg&lt;/code&gt; does not represent an Option<a name="line.374"></a>
+<span class="sourceLineNo">375</span>     */<a name="line.375"></a>
+<span class="sourceLineNo">376</span>    protected void processOption(String arg, ListIterator&lt;String&gt; iter) throws ParseException<a name="line.376"></a>
+<span class="sourceLineNo">377</span>    {<a name="line.377"></a>
+<span class="sourceLineNo">378</span>        boolean hasOption = getOptions().hasOption(arg);<a name="line.378"></a>
+<span class="sourceLineNo">379</span><a name="line.379"></a>
+<span class="sourceLineNo">380</span>        // if there is no option throw an UnrecognisedOptionException<a name="line.380"></a>
+<span class="sourceLineNo">381</span>        if (!hasOption)<a name="line.381"></a>
+<span class="sourceLineNo">382</span>        {<a name="line.382"></a>
+<span class="sourceLineNo">383</span>            throw new UnrecognizedOptionException("Unrecognized option: " + arg, arg);<a name="line.383"></a>
+<span class="sourceLineNo">384</span>        }<a name="line.384"></a>
+<span class="sourceLineNo">385</span><a name="line.385"></a>
+<span class="sourceLineNo">386</span>        // get the option represented by arg<a name="line.386"></a>
+<span class="sourceLineNo">387</span>        Option opt = (Option) getOptions().getOption(arg).clone();<a name="line.387"></a>
+<span class="sourceLineNo">388</span>        <a name="line.388"></a>
+<span class="sourceLineNo">389</span>        // update the required options and groups<a name="line.389"></a>
+<span class="sourceLineNo">390</span>        updateRequiredOptions(opt);<a name="line.390"></a>
+<span class="sourceLineNo">391</span>        <a name="line.391"></a>
+<span class="sourceLineNo">392</span>        // if the option takes an argument value<a name="line.392"></a>
+<span class="sourceLineNo">393</span>        if (opt.hasArg())<a name="line.393"></a>
+<span class="sourceLineNo">394</span>        {<a name="line.394"></a>
+<span class="sourceLineNo">395</span>            processArgs(opt, iter);<a name="line.395"></a>
+<span class="sourceLineNo">396</span>        }<a name="line.396"></a>
+<span class="sourceLineNo">397</span>        <a name="line.397"></a>
+<span class="sourceLineNo">398</span>        // set the option on the command line<a name="line.398"></a>
+<span class="sourceLineNo">399</span>        cmd.addOption(opt);<a name="line.399"></a>
+<span class="sourceLineNo">400</span>    }<a name="line.400"></a>
+<span class="sourceLineNo">401</span><a name="line.401"></a>
+<span class="sourceLineNo">402</span>    /**<a name="line.402"></a>
+<span class="sourceLineNo">403</span>     * Removes the option or its group from the list of expected elements.<a name="line.403"></a>
+<span class="sourceLineNo">404</span>     * <a name="line.404"></a>
+<span class="sourceLineNo">405</span>     * @param opt<a name="line.405"></a>
+<span class="sourceLineNo">406</span>     */<a name="line.406"></a>
+<span class="sourceLineNo">407</span>    private void updateRequiredOptions(Option opt) throws ParseException<a name="line.407"></a>
+<span class="sourceLineNo">408</span>    {<a name="line.408"></a>
+<span class="sourceLineNo">409</span>        // if the option is a required option remove the option from<a name="line.409"></a>
+<span class="sourceLineNo">410</span>        // the requiredOptions list<a name="line.410"></a>
+<span class="sourceLineNo">411</span>        if (opt.isRequired())<a name="line.411"></a>
+<span class="sourceLineNo">412</span>        {<a name="line.412"></a>
+<span class="sourceLineNo">413</span>            getRequiredOptions().remove(opt.getKey());<a name="line.413"></a>
+<span class="sourceLineNo">414</span>        }<a name="line.414"></a>
+<span class="sourceLineNo">415</span><a name="line.415"></a>
+<span class="sourceLineNo">416</span>        // if the option is in an OptionGroup make that option the selected<a name="line.416"></a>
+<span class="sourceLineNo">417</span>        // option of the group<a name="line.417"></a>
+<span class="sourceLineNo">418</span>        if (getOptions().getOptionGroup(opt) != null)<a name="line.418"></a>
+<span class="sourceLineNo">419</span>        {<a name="line.419"></a>
+<span class="sourceLineNo">420</span>            OptionGroup group = getOptions().getOptionGroup(opt);<a name="line.420"></a>
+<span class="sourceLineNo">421</span><a name="line.421"></a>
+<span class="sourceLineNo">422</span>            if (group.isRequired())<a name="line.422"></a>
+<span class="sourceLineNo">423</span>            {<a name="line.423"></a>
+<span class="sourceLineNo">424</span>                getRequiredOptions().remove(group);<a name="line.424"></a>
+<span class="sourceLineNo">425</span>            }<a name="line.425"></a>
+<span class="sourceLineNo">426</span><a name="line.426"></a>
+<span class="sourceLineNo">427</span>            group.setSelected(opt);<a name="line.427"></a>
+<span class="sourceLineNo">428</span>        }<a name="line.428"></a>
+<span class="sourceLineNo">429</span>    }<a name="line.429"></a>
+<span class="sourceLineNo">430</span>}<a name="line.430"></a>
 
 
 



Mime
View raw message