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/proposal/myrmidon/src/java/org/apache/aut/converter ConverterContext.java Converter.java AbstractConverter.java
Date Thu, 14 Feb 2002 10:07:50 GMT
donaldp     02/02/14 02:07:50

  Modified:    proposal/myrmidon/src/java/org/apache/aut/converter
                        Converter.java AbstractConverter.java
  Added:       proposal/myrmidon/src/java/org/apache/aut/converter
                        ConverterContext.java
  Log:
  Map --> ConverterContext
  
  Revision  Changes    Path
  1.2       +2 -2      jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/converter/Converter.java
  
  Index: Converter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/converter/Converter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Converter.java	14 Feb 2002 10:03:51 -0000	1.1
  +++ Converter.java	14 Feb 2002 10:07:50 -0000	1.2
  @@ -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.1 $ $Date: 2002/02/14 10:03:51 $
  + * @version $Revision: 1.2 $ $Date: 2002/02/14 10:07:50 $
    * @ant:role shorthand="converter"
    */
   public interface Converter
  @@ -32,6 +32,6 @@
        * @return the converted object
        * @exception ConverterException if an error occurs
        */
  -    Object convert( Class destination, Object original, Map context )
  +    Object convert( Class destination, Object original, ConverterContext context )
           throws ConverterException;
   }
  
  
  
  1.2       +3 -4      jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/converter/AbstractConverter.java
  
  Index: AbstractConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/converter/AbstractConverter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractConverter.java	14 Feb 2002 10:03:51 -0000	1.1
  +++ AbstractConverter.java	14 Feb 2002 10:07:50 -0000	1.2
  @@ -7,7 +7,6 @@
    */
   package org.apache.aut.converter;
   
  -import java.util.Map;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
   
  @@ -15,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.1 $ $Date: 2002/02/14 10:03:51 $
  + * @version $Revision: 1.2 $ $Date: 2002/02/14 10:07:50 $
    */
   public abstract class AbstractConverter
       implements Converter
  @@ -49,7 +48,7 @@
        */
       public Object convert( final Class destination,
                              final Object original,
  -                           final Map context )
  +                           final ConverterContext context )
           throws ConverterException
       {
           if( m_destination != destination )
  @@ -77,7 +76,7 @@
        * @return the converted object
        * @exception ConverterException if an error occurs
        */
  -    protected abstract Object convert( Object original, Map context )
  +    protected abstract Object convert( Object original, ConverterContext context )
           throws ConverterException;
   }
   
  
  
  
  1.1                  jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/converter/ConverterContext.java
  
  Index: ConverterContext.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.aut.converter;
  
  /**
   * The context in which objects can be converted from one type to another type.
   *
   * @author <a href="mailto:peter@apache.org">Peter Donald</a>
   * @version $Revision: 1.1 $ $Date: 2002/02/14 10:07:50 $
   * @ant:role shorthand="converter"
   */
  public interface ConverterContext
  {
      /**
       * Retrieve a vlaue from the context with the specified key.
       * Will return null if no such value exists.
       */
      Object get( Object key );
  }
  
  
  

--
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