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/container/src/java/org/apache/myrmidon/components/configurer ConfigurationState.java DefaultConfigurer.java DefaultObjectConfigurer.java ObjectConfigurer.java
Date Sun, 23 Jun 2002 08:51:29 GMT
donaldp     2002/06/23 01:51:29

  Modified:    container/src/java/org/apache/myrmidon/components/configurer
                        ConfigurationState.java DefaultConfigurer.java
                        DefaultObjectConfigurer.java
  Removed:     container/src/java/org/apache/myrmidon/components/configurer
                        ObjectConfigurer.java
  Log:
  Merge the ObjectConfigurer/DefaultObjectConfigurer classes as no need to keep them separate.
  
  Revision  Changes    Path
  1.7       +4 -4      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/configurer/ConfigurationState.java
  
  Index: ConfigurationState.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/configurer/ConfigurationState.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ConfigurationState.java	5 Mar 2002 14:46:05 -0000	1.6
  +++ ConfigurationState.java	23 Jun 2002 08:51:29 -0000	1.7
  @@ -17,10 +17,10 @@
   class ConfigurationState
   {
       private final int[] m_propertyCount;
  -    private final ObjectConfigurer m_configurer;
  +    private final DefaultObjectConfigurer m_configurer;
       private final Object m_object;
   
  -    public ConfigurationState( final ObjectConfigurer configurer,
  +    public ConfigurationState( final DefaultObjectConfigurer configurer,
                                  final Object object,
                                  final int propertyCount )
       {
  @@ -32,7 +32,7 @@
       /**
        * Returns the configurer being used to configure the object.
        */
  -    public ObjectConfigurer getConfigurer()
  +    public DefaultObjectConfigurer getConfigurer()
       {
           return m_configurer;
       }
  
  
  
  1.55      +7 -7      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurer.java
  
  Index: DefaultConfigurer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurer.java,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- DefaultConfigurer.java	13 Jun 2002 02:24:45 -0000	1.54
  +++ DefaultConfigurer.java	23 Jun 2002 08:51:29 -0000	1.55
  @@ -111,7 +111,7 @@
           {
               // Start configuration of the object
               final String elemName = model.getName();
  -            final ObjectConfigurer configurer = getConfigurer( clazz );
  +            final DefaultObjectConfigurer configurer = getConfigurer( clazz );
               final ConfigurationState state = configurer.startConfiguration( object );
   
               // Set each of the attributes
  @@ -234,7 +234,7 @@
           throws ModelException
       {
           // Locate the configurer for this object
  -        final ObjectConfigurer configurer = getConfigurer( clazz );
  +        final DefaultObjectConfigurer configurer = getConfigurer( clazz );
   
           // TODO - this ain't right, the validation is going to be screwed up
           final ConfigurationState state = configurer.startConfiguration( object );
  @@ -431,11 +431,11 @@
       /**
        * Locates the configurer for a particular class.
        */
  -    private ObjectConfigurer getConfigurer( final Class clazz )
  +    private DefaultObjectConfigurer getConfigurer( final Class clazz )
           throws ModelException
       {
  -        ObjectConfigurer configurer =
  -            (ObjectConfigurer)m_configurerCache.get( clazz );
  +        DefaultObjectConfigurer configurer =
  +            (DefaultObjectConfigurer)m_configurerCache.get( clazz );
           if( null == configurer )
           {
               configurer = DefaultObjectConfigurer.getConfigurer( clazz );
  @@ -499,7 +499,7 @@
        * @param configurer The configurer for the class being configured.
        * @param name The attribute/element name.
        */
  -    private PropertyConfigurer getConfigurerFromName( final ObjectConfigurer configurer,
  +    private PropertyConfigurer getConfigurerFromName( final DefaultObjectConfigurer configurer,
                                                         final String name,
                                                         boolean ignoreRoleName,
                                                         final boolean isAdder,
  
  
  
  1.25      +29 -7     jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/configurer/DefaultObjectConfigurer.java
  
  Index: DefaultObjectConfigurer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/configurer/DefaultObjectConfigurer.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- DefaultObjectConfigurer.java	23 Jun 2002 08:37:36 -0000	1.24
  +++ DefaultObjectConfigurer.java	23 Jun 2002 08:51:29 -0000	1.25
  @@ -28,7 +28,6 @@
    * @version $Revision$ $Date$
    */
   class DefaultObjectConfigurer
  -    implements ObjectConfigurer
   {
       private static final Resources REZ =
           ResourceManager.getPackageResources( DefaultObjectConfigurer.class );
  @@ -267,7 +266,7 @@
       /**
        * Locates the configurer for a particular class.
        */
  -    public static ObjectConfigurer getConfigurer( final Class classInfo )
  +    public static DefaultObjectConfigurer getConfigurer( final Class classInfo )
           throws ModelException
       {
           final DefaultObjectConfigurer configurer = new DefaultObjectConfigurer( classInfo
);
  @@ -277,6 +276,11 @@
   
       /**
        * Starts the configuration of an object.
  +     *
  +     * @param object The object about to be configured.
  +     * @return  The state object, used to track type-specific state during
  +     *          configuration.
  +     * @throws  ModelException On error starting the configuration.
        */
       public ConfigurationState startConfiguration( Object object )
           throws ModelException
  @@ -287,6 +291,10 @@
       /**
        * Finishes the configuration of an object, performing any final
        * validation and type conversion.
  +     *
  +     * @param state The state object.
  +     * @return The configured object.
  +     * @throws ModelException On error finishing the configurtion.
        */
       public Object finishConfiguration( final ConfigurationState state )
           throws ModelException
  @@ -297,7 +305,11 @@
       }
   
       /**
  -     * Returns a configurer for an element of this class.
  +     * Returns a configurer for a element property of this class.
  +     *
  +     * @param name The element name.
  +     * @return A configurer for the property, or null if the property is not
  +     *         valid for this class.
        */
       public PropertyConfigurer getAdder( final String name )
       {
  @@ -305,8 +317,12 @@
       }
   
       /**
  -     * Returns a configurer for an element of this class.
  -     */
  +      * Returns a configurer for a atribute property of this class.
  +      *
  +      * @param name The attribute name.
  +      * @return A configurer for the property, or null if the property is not
  +      *         valid for this class.
  +      */
       public PropertyConfigurer getSetter( final String name )
       {
           return (PropertyConfigurer)m_setters.get( name );
  @@ -314,6 +330,9 @@
   
       /**
        * Returns a configurer for the typed property of this class.
  +     *
  +     * @return A configurer for the typed property, or null if the class
  +     *         does not have a typed property.
        */
       public PropertyConfigurer getTypedProperty()
       {
  @@ -321,7 +340,10 @@
       }
   
       /**
  -     * Returns a configurer for the content of this class.
  +     * Returns a configurer for the text content of this class.
  +     *
  +     * @return A configurer for the text content, or null if the class does not
  +     *         support text content.
        */
       public PropertyConfigurer getContentConfigurer()
       {
  
  
  

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