avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/cli/src/java/org/apache/avalon/excalibur/cli AbstractParserControl.java CLArgsParser.java CLOption.java CLOptionDescriptor.java CLUtil.java ParserControl.java
Date Thu, 21 Mar 2002 00:47:59 GMT
donaldp     02/03/20 16:47:59

  Modified:    cli/src/java/org/apache/avalon/excalibur/cli
                        AbstractParserControl.java CLArgsParser.java
                        CLOption.java CLOptionDescriptor.java CLUtil.java
                        ParserControl.java
  Log:
  Fixed some checkstyle warnings.
  
  Revision  Changes    Path
  1.6       +7 -0      jakarta-avalon-excalibur/cli/src/java/org/apache/avalon/excalibur/cli/AbstractParserControl.java
  
  Index: AbstractParserControl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/cli/src/java/org/apache/avalon/excalibur/cli/AbstractParserControl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractParserControl.java	11 Dec 2001 09:53:26 -0000	1.5
  +++ AbstractParserControl.java	21 Mar 2002 00:47:59 -0000	1.6
  @@ -17,6 +17,13 @@
   public abstract class AbstractParserControl
       implements ParserControl
   {
  +    /**
  +     * By default always continue parsing by returning false.
  +     *
  +     * @param lastOptionCode the code of last option parsed 
  +     * @return return true to halt, false to continue parsing
  +     * @see ParserControl#isFinished(int)
  +     */
       public boolean isFinished( int lastOptionCode )
       {
           return false;
  
  
  
  1.16      +7 -0      jakarta-avalon-excalibur/cli/src/java/org/apache/avalon/excalibur/cli/CLArgsParser.java
  
  Index: CLArgsParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/cli/src/java/org/apache/avalon/excalibur/cli/CLArgsParser.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- CLArgsParser.java	20 Mar 2002 10:03:21 -0000	1.15
  +++ CLArgsParser.java	21 Mar 2002 00:47:59 -0000	1.16
  @@ -68,6 +68,12 @@
       private CLOption m_option;
       private int m_state = STATE_NORMAL;
   
  +    /**
  +     * Retrieve an array of arguments that have not been parsed 
  +     * due to the parser halting.
  +     *
  +     * @return an array of unparsed args
  +     */
       public final String[] getUnparsedArgs()
       {
           return m_unparsedArgs;
  @@ -197,6 +203,7 @@
        * @param args the args, typically that passed to the
        * <code>public static void main(String[] args)</code> method.
        * @param optionDescriptors the option descriptors
  +     * @param control the parser control used determine behaviour of parser
        */
       public CLArgsParser( final String[] args,
                            final CLOptionDescriptor[] optionDescriptors,
  
  
  
  1.8       +2 -0      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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- CLOption.java	19 Mar 2002 11:21:00 -0000	1.7
  +++ CLOption.java	21 Mar 2002 00:47:59 -0000	1.8
  @@ -109,6 +109,8 @@
   
       /**
        * Get number of arguments.
  +     *
  +     * @return the number of arguments
        */
       public final int getArgumentCount()
       {
  
  
  
  1.10      +7 -0      jakarta-avalon-excalibur/cli/src/java/org/apache/avalon/excalibur/cli/CLOptionDescriptor.java
  
  Index: CLOptionDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/cli/src/java/org/apache/avalon/excalibur/cli/CLOptionDescriptor.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- CLOptionDescriptor.java	20 Mar 2002 09:42:05 -0000	1.9
  +++ CLOptionDescriptor.java	21 Mar 2002 00:47:59 -0000	1.10
  @@ -59,6 +59,7 @@
        * @param flags the flags
        * @param id the id/character option
        * @param description description of option usage
  +     * @param incompatable an array listing the ids of all incompatible options
        */
       public CLOptionDescriptor( final String name,
                                  final int flags,
  @@ -104,12 +105,18 @@
   
       /**
        * @deprecated Use the correctly spelled {@link #getIncompatible} instead.
  +     * @return the array of incompatible option ids
        */
       protected final int[] getIncompatble()
       {
           return getIncompatible();
       }
   
  +    /**
  +     * Get the array of incompatible option ids.
  +     * 
  +     * @return the array of incompatible option ids
  +     */
       protected final int[] getIncompatible()
       {
           return m_incompatible;
  
  
  
  1.10      +2 -2      jakarta-avalon-excalibur/cli/src/java/org/apache/avalon/excalibur/cli/CLUtil.java
  
  Index: CLUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/cli/src/java/org/apache/avalon/excalibur/cli/CLUtil.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- CLUtil.java	19 Mar 2002 10:47:51 -0000	1.9
  +++ CLUtil.java	21 Mar 2002 00:47:59 -0000	1.10
  @@ -15,7 +15,7 @@
    */
   public final class CLUtil
   {
  -    private final static int MAX_DESCRIPTION_COLUMN_LENGTH = 60;
  +    private static final int MAX_DESCRIPTION_COLUMN_LENGTH = 60;
   
       /**
        * Format options into StringBuffer and return. This is typically used to
  @@ -24,7 +24,7 @@
        * @param options the option descriptors
        * @return the formatted description/help for options
        */
  -    public final static StringBuffer describeOptions( final CLOptionDescriptor[] options
)
  +    public static final StringBuffer describeOptions( final CLOptionDescriptor[] options
)
       {
           final String lSep = System.getProperty( "line.separator" );
           final StringBuffer sb = new StringBuffer();
  
  
  
  1.5       +7 -0      jakarta-avalon-excalibur/cli/src/java/org/apache/avalon/excalibur/cli/ParserControl.java
  
  Index: ParserControl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/cli/src/java/org/apache/avalon/excalibur/cli/ParserControl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ParserControl.java	11 Dec 2001 09:53:26 -0000	1.4
  +++ ParserControl.java	21 Mar 2002 00:47:59 -0000	1.5
  @@ -15,5 +15,12 @@
    */
   public interface ParserControl
   {
  +    /**
  +     * Called by the parser to determine whether it should stop 
  +     * after last option parsed.
  +     *
  +     * @param lastOptionCode the code of last option parsed 
  +     * @return return true to halt, false to continue parsing
  +     */
       boolean isFinished( int lastOptionCode );
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message