You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by do...@apache.org on 2002/03/19 12:21:00 UTC
cvs commit: jakarta-avalon-excalibur/cli/src/java/org/apache/avalon/excalibur/cli CLOption.java
donaldp 02/03/19 03:21:00
Modified: cli/src/java/org/apache/avalon/excalibur/cli CLOption.java
Log:
Move constructors to top of file
Revision Changes Path
1.7 +23 -21 jakarta-avalon-excalibur/cli/src/java/org/apache/avalon/excalibur/cli/CLOption.java
Index: CLOption.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/cli/src/java/org/apache/avalon/excalibur/cli/CLOption.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- CLOption.java 16 Mar 2002 00:04:26 -0000 1.6
+++ CLOption.java 19 Mar 2002 11:21:00 -0000 1.7
@@ -26,6 +26,27 @@
private String[] m_arguments;
/**
+ * Constructor taking an id (that must be a proper character code)
+ *
+ * @param id the new id
+ */
+ public CLOption( final int id )
+ {
+ m_id = id;
+ }
+
+ /**
+ * Constructor taking argument for option.
+ *
+ * @param argument the argument
+ */
+ public CLOption( final String argument )
+ {
+ this( TEXT_ARGUMENT );
+ addArgument( argument );
+ }
+
+ /**
* Retrieve argument to option if it takes arguments.
*
* @return the (first) argument
@@ -67,27 +88,6 @@
}
/**
- * Constructor taking an id (that must be a proper character code)
- *
- * @param id the new id
- */
- public CLOption( final int id )
- {
- m_id = id;
- }
-
- /**
- * Constructor taking argument for option.
- *
- * @param argument the argument
- */
- public CLOption( final String argument )
- {
- this( TEXT_ARGUMENT );
- addArgument( argument );
- }
-
- /**
* Mutator of Argument property.
*
* @param argument the argument
@@ -95,7 +95,9 @@
public final void addArgument( final String argument )
{
if( null == m_arguments )
+ {
m_arguments = new String[]{argument};
+ }
else
{
final String[] arguments = new String[ m_arguments.length + 1 ];
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>