ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib ObjectToStringConverter.java StringToBooleanConverter.java StringToByteConverter.java StringToClassConverter.java StringToDateConverter.java StringToDoubleConverter.java StringToFloatConverter.java StringToIntegerConverter.java StringToLongConverter.java StringToShortConverter.java StringToURLConverter.java
Date Sun, 14 Apr 2002 09:22:49 GMT
donaldp     02/04/14 02:22:49

  Modified:    aut/src/java/org/apache/aut/converter AbstractConverter.java
                        AbstractMasterConverter.java Converter.java
               aut/src/java/org/apache/aut/converter/lib
                        ObjectToStringConverter.java
                        StringToBooleanConverter.java
                        StringToByteConverter.java
                        StringToClassConverter.java
                        StringToDateConverter.java
                        StringToDoubleConverter.java
                        StringToFloatConverter.java
                        StringToIntegerConverter.java
                        StringToLongConverter.java
                        StringToShortConverter.java
                        StringToURLConverter.java
  Log:
  Fix up some checkstyle violations.
  
  Revision  Changes    Path
  1.6       +2 -2      jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/AbstractConverter.java
  
  Index: AbstractConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/AbstractConverter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractConverter.java	29 Mar 2002 12:56:36 -0000	1.5
  +++ AbstractConverter.java	14 Apr 2002 09:22:48 -0000	1.6
  @@ -14,7 +14,7 @@
    * Instances of this interface are used to convert between different types.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.5 $ $Date: 2002/03/29 12:56:36 $
  + * @version $Revision: 1.6 $ $Date: 2002/04/14 09:22:48 $
    */
   public abstract class AbstractConverter
       implements Converter
  @@ -49,7 +49,7 @@
       public Object convert( final Class destination,
                              final Object original,
                              final Object context )
  -        throws org.apache.aut.converter.ConverterException
  +        throws ConverterException
       {
           if( m_destination != destination )
           {
  
  
  
  1.6       +2 -2      jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/AbstractMasterConverter.java
  
  Index: AbstractMasterConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/AbstractMasterConverter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractMasterConverter.java	29 Mar 2002 12:56:36 -0000	1.5
  +++ AbstractMasterConverter.java	14 Apr 2002 09:22:48 -0000	1.6
  @@ -30,7 +30,7 @@
    * when it is first used.</p>
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.5 $ $Date: 2002/03/29 12:56:36 $
  + * @version $Revision: 1.6 $ $Date: 2002/04/14 09:22:48 $
    */
   public abstract class AbstractMasterConverter
       implements Converter
  @@ -56,7 +56,7 @@
        * @param original the original object
        * @param context the context in which to convert
        * @return the converted object
  -     * @exception org.apache.aut.converter.ConverterException if an error occurs
  +     * @exception ConverterException if an error occurs
        */
       public Object convert( final Class destination,
                              final Object original,
  
  
  
  1.6       +2 -1      jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/Converter.java
  
  Index: Converter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/Converter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Converter.java	21 Feb 2002 10:16:42 -0000	1.5
  +++ Converter.java	14 Apr 2002 09:22:48 -0000	1.6
  @@ -11,11 +11,12 @@
    * Instances of this interface are used to convert between different types.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.5 $ $Date: 2002/02/21 10:16:42 $
  + * @version $Revision: 1.6 $ $Date: 2002/04/14 09:22:48 $
    * @ant:role shorthand="converter"
    */
   public interface Converter
   {
  +    /** Role String for interface */
       String ROLE = Converter.class.getName();
   
       /**
  
  
  
  1.2       +10 -2     jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/ObjectToStringConverter.java
  
  Index: ObjectToStringConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/ObjectToStringConverter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ObjectToStringConverter.java	23 Mar 2002 05:34:17 -0000	1.1
  +++ ObjectToStringConverter.java	14 Apr 2002 09:22:49 -0000	1.2
  @@ -15,20 +15,28 @@
    * its toString() method.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/03/23 05:34:17 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/14 09:22:49 $
    *
    * @ant.converter source="java.lang.Object" destination="java.lang.String"
    */
   public class ObjectToStringConverter
       extends AbstractConverter
   {
  +    /**
  +     * Construct the converter.
  +     */
       public ObjectToStringConverter()
       {
           super( Object.class, String.class );
       }
   
       /**
  -     * Converts an object.
  +     * Converts a object to a string.
  +     *
  +     * @param original the original object to convert
  +     * @param context the context in which to convert object (unused)
  +     * @return the converted object
  +     * @throws ConverterException if error converting object
        */
       protected Object convert( final Object original, final Object context )
           throws ConverterException
  
  
  
  1.3       +15 -4     jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/StringToBooleanConverter.java
  
  Index: StringToBooleanConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/StringToBooleanConverter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StringToBooleanConverter.java	29 Mar 2002 12:56:36 -0000	1.2
  +++ StringToBooleanConverter.java	14 Apr 2002 09:22:49 -0000	1.3
  @@ -24,22 +24,33 @@
       private static final Resources REZ =
           ResourceManager.getPackageResources( StringToBooleanConverter.class );
   
  +    /**
  +     * Construct the converter.
  +     */
       public StringToBooleanConverter()
       {
           super( String.class, Boolean.class );
       }
   
  +    /**
  +     * Converts a string to a boolean.
  +     *
  +     * @param object the original object to convert
  +     * @param context the context in which to convert object (unused)
  +     * @return the converted object
  +     * @throws ConverterException if error converting object
  +     */
       public Object convert( final Object object, final Object context )
           throws ConverterException
       {
           final String string = (String)object;
  -        if( string.equalsIgnoreCase( "true" )
  -            || string.equalsIgnoreCase( "yes" ) )
  +        if( string.equalsIgnoreCase( "true" ) || 
  +	    string.equalsIgnoreCase( "yes" ) )
           {
               return Boolean.TRUE;
           }
  -        else if( string.equalsIgnoreCase( "false" )
  -                 || string.equalsIgnoreCase( "no" ) )
  +        else if( string.equalsIgnoreCase( "false" ) || 
  +		 string.equalsIgnoreCase( "no" ) )
           {
               return Boolean.FALSE;
           }
  
  
  
  1.4       +11 -0     jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/StringToByteConverter.java
  
  Index: StringToByteConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/StringToByteConverter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StringToByteConverter.java	29 Mar 2002 12:56:36 -0000	1.3
  +++ StringToByteConverter.java	14 Apr 2002 09:22:49 -0000	1.4
  @@ -27,11 +27,22 @@
       private static final Resources REZ =
           ResourceManager.getPackageResources( StringToByteConverter.class );
   
  +    /**
  +     * Construct the converter.
  +     */
       public StringToByteConverter()
       {
           super( String.class, Byte.class );
       }
   
  +    /**
  +     * Converts a string to a byte.
  +     *
  +     * @param object the original object to convert
  +     * @param context the context in which to convert object (unused)
  +     * @return the converted object
  +     * @throws ConverterException if error converting object
  +     */
       public Object convert( final Object object, final Object context )
           throws ConverterException
       {
  
  
  
  1.3       +11 -0     jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/StringToClassConverter.java
  
  Index: StringToClassConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/StringToClassConverter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StringToClassConverter.java	29 Mar 2002 12:56:36 -0000	1.2
  +++ StringToClassConverter.java	14 Apr 2002 09:22:49 -0000	1.3
  @@ -24,11 +24,22 @@
       private static final Resources REZ =
           ResourceManager.getPackageResources( StringToClassConverter.class );
   
  +    /**
  +     * Construct the converter.
  +     */
       public StringToClassConverter()
       {
           super( String.class, Class.class );
       }
   
  +    /**
  +     * Converts a string to a class.
  +     *
  +     * @param object the original object to convert
  +     * @param context the context in which to convert object (unused)
  +     * @return the converted object
  +     * @throws ConverterException if error converting object
  +     */
       public Object convert( final Object object, final Object context )
           throws ConverterException
       {
  
  
  
  1.3       +11 -0     jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/StringToDateConverter.java
  
  Index: StringToDateConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/StringToDateConverter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StringToDateConverter.java	29 Mar 2002 12:56:36 -0000	1.2
  +++ StringToDateConverter.java	14 Apr 2002 09:22:49 -0000	1.3
  @@ -30,11 +30,22 @@
       private static final Resources REZ =
           ResourceManager.getPackageResources( StringToDateConverter.class );
   
  +    /**
  +     * Construct the converter.
  +     */
       public StringToDateConverter()
       {
           super( String.class, Date.class );
       }
   
  +    /**
  +     * Converts a string to a date.
  +     *
  +     * @param object the original object to convert
  +     * @param context the context in which to convert object (unused)
  +     * @return the converted object
  +     * @throws ConverterException if error converting object
  +     */
       public Object convert( final Object object, final Object context )
           throws ConverterException
       {
  
  
  
  1.3       +11 -0     jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/StringToDoubleConverter.java
  
  Index: StringToDoubleConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/StringToDoubleConverter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StringToDoubleConverter.java	29 Mar 2002 12:56:36 -0000	1.2
  +++ StringToDoubleConverter.java	14 Apr 2002 09:22:49 -0000	1.3
  @@ -24,11 +24,22 @@
       private static final Resources REZ =
           ResourceManager.getPackageResources( StringToDoubleConverter.class );
   
  +    /**
  +     * Construct the converter.
  +     */
       public StringToDoubleConverter()
       {
           super( String.class, Double.class );
       }
   
  +    /**
  +     * Converts a string to a double.
  +     *
  +     * @param object the original object to convert
  +     * @param context the context in which to convert object (unused)
  +     * @return the converted object
  +     * @throws ConverterException if error converting object
  +     */
       public Object convert( final Object object, final Object context )
           throws ConverterException
       {
  
  
  
  1.3       +11 -0     jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/StringToFloatConverter.java
  
  Index: StringToFloatConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/StringToFloatConverter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StringToFloatConverter.java	29 Mar 2002 12:56:36 -0000	1.2
  +++ StringToFloatConverter.java	14 Apr 2002 09:22:49 -0000	1.3
  @@ -24,11 +24,22 @@
       private static final Resources REZ =
           ResourceManager.getPackageResources( StringToFloatConverter.class );
   
  +    /**
  +     * Construct the converter.
  +     */
       public StringToFloatConverter()
       {
           super( String.class, Float.class );
       }
   
  +    /**
  +     * Converts a string to a float.
  +     *
  +     * @param object the original object to convert
  +     * @param context the context in which to convert object (unused)
  +     * @return the converted object
  +     * @throws ConverterException if error converting object
  +     */
       public Object convert( final Object object, final Object context )
           throws ConverterException
       {
  
  
  
  1.4       +11 -1     jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/StringToIntegerConverter.java
  
  Index: StringToIntegerConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/StringToIntegerConverter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StringToIntegerConverter.java	29 Mar 2002 12:56:36 -0000	1.3
  +++ StringToIntegerConverter.java	14 Apr 2002 09:22:49 -0000	1.4
  @@ -9,7 +9,6 @@
   
   import org.apache.aut.converter.AbstractConverter;
   import org.apache.aut.converter.ConverterException;
  -import org.apache.aut.converter.lib.StringToFloatConverter;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
   
  @@ -28,11 +27,22 @@
       private static final Resources REZ =
           ResourceManager.getPackageResources( StringToFloatConverter.class );
   
  +    /**
  +     * Construct the converter.
  +     */
       public StringToIntegerConverter()
       {
           super( String.class, Integer.class );
       }
   
  +    /**
  +     * Converts a string to an Integer.
  +     *
  +     * @param object the original object to convert
  +     * @param context the context in which to convert object (unused)
  +     * @return the converted object
  +     * @throws ConverterException if error converting object
  +     */
       public Object convert( final Object object, final Object context )
           throws ConverterException
       {
  
  
  
  1.4       +11 -0     jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/StringToLongConverter.java
  
  Index: StringToLongConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/StringToLongConverter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StringToLongConverter.java	29 Mar 2002 12:56:36 -0000	1.3
  +++ StringToLongConverter.java	14 Apr 2002 09:22:49 -0000	1.4
  @@ -27,11 +27,22 @@
       private static final Resources REZ =
           ResourceManager.getPackageResources( StringToLongConverter.class );
   
  +    /**
  +     * Construct the converter.
  +     */
       public StringToLongConverter()
       {
           super( String.class, Long.class );
       }
   
  +    /**
  +     * Converts a string to a long.
  +     *
  +     * @param object the original object to convert
  +     * @param context the context in which to convert object (unused)
  +     * @return the converted object
  +     * @throws ConverterException if error converting object
  +     */
       public Object convert( final Object object, final Object context )
           throws ConverterException
       {
  
  
  
  1.4       +11 -0     jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/StringToShortConverter.java
  
  Index: StringToShortConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/StringToShortConverter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StringToShortConverter.java	29 Mar 2002 12:56:36 -0000	1.3
  +++ StringToShortConverter.java	14 Apr 2002 09:22:49 -0000	1.4
  @@ -27,11 +27,22 @@
       private static final Resources REZ =
           ResourceManager.getPackageResources( StringToShortConverter.class );
   
  +    /**
  +     * Construct the converter.
  +     */
       public StringToShortConverter()
       {
           super( String.class, Short.class );
       }
   
  +    /**
  +     * Converts a string to a short.
  +     *
  +     * @param object the original object to convert
  +     * @param context the context in which to convert object (unused)
  +     * @return the converted object
  +     * @throws ConverterException if error converting object
  +     */
       public Object convert( final Object object, final Object context )
           throws ConverterException
       {
  
  
  
  1.3       +11 -0     jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/StringToURLConverter.java
  
  Index: StringToURLConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/converter/lib/StringToURLConverter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StringToURLConverter.java	29 Mar 2002 12:56:36 -0000	1.2
  +++ StringToURLConverter.java	14 Apr 2002 09:22:49 -0000	1.3
  @@ -26,11 +26,22 @@
       private static final Resources REZ =
           ResourceManager.getPackageResources( StringToURLConverter.class );
   
  +    /**
  +     * Construct the converter.
  +     */
       public StringToURLConverter()
       {
           super( String.class, URL.class );
       }
   
  +    /**
  +     * Converts a string to a url.
  +     *
  +     * @param object the original object to convert
  +     * @param context the context in which to convert object (unused)
  +     * @return the converted object
  +     * @throws ConverterException if error converting object
  +     */
       public Object convert( final Object object, final Object context )
           throws ConverterException
       {
  
  
  

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


Mime
View raw message