avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/metainfo ComponentDescriptor.java DependencyDescriptor.java ServiceDescriptor.java
Date Fri, 07 Jun 2002 11:11:26 GMT
mcconnell    2002/06/07 04:11:26

  Modified:    containerkit/src/java/org/apache/excalibur/containerkit/metainfo
                        ComponentDescriptor.java DependencyDescriptor.java
                        ServiceDescriptor.java
  Log:
  replacement of Enumeration with String[] on getAttributeNames()
  
  Revision  Changes    Path
  1.8       +7 -6      jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/metainfo/ComponentDescriptor.java
  
  Index: ComponentDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/metainfo/ComponentDescriptor.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ComponentDescriptor.java	7 Jun 2002 02:22:17 -0000	1.7
  +++ ComponentDescriptor.java	7 Jun 2002 11:11:26 -0000	1.8
  @@ -50,10 +50,12 @@
    * </pre>
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.7 $ $Date: 2002/06/07 02:22:17 $
  + * @version $Revision: 1.8 $ $Date: 2002/06/07 11:11:26 $
    */
   public final class ComponentDescriptor
   {
  +    private static final String[] EMPTY_SET = new String[0];
  +
       /**
        * The short name of the Component Type. Useful for displaying
        * human readable strings describing the type in
  @@ -172,18 +174,17 @@
      /**
       * Returns the set of attribute names available under this descriptor.
       * 
  -    * @return Enumeration an enumeration of the properties names held by the 
  -    *   descriptor.
  +    * @return an array of the properties names held by the descriptor.
       */
  -    public Enumeration getAttributeNames()
  +    public String[] getAttributeNames()
       {
           if( null == m_attributes )
           {
  -            return ComponentInfo.EMPTY_ENUMERATION;
  +            return EMPTY_SET;
           }
           else
           {
  -            return m_attributes.propertyNames();
  +            return (String[]) m_attributes.keySet().toArray( EMPTY_SET );
           }
       }
   
  
  
  
  1.7       +8 -6      jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/metainfo/DependencyDescriptor.java
  
  Index: DependencyDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/metainfo/DependencyDescriptor.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DependencyDescriptor.java	7 Jun 2002 02:22:17 -0000	1.6
  +++ DependencyDescriptor.java	7 Jun 2002 11:11:26 -0000	1.7
  @@ -33,10 +33,13 @@
    * demands.</p>
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.6 $ $Date: 2002/06/07 02:22:17 $
  + * @version $Revision: 1.7 $ $Date: 2002/06/07 11:11:26 $
    */
   public final class DependencyDescriptor
   {
  +
  +    private static final String[] EMPTY_SET = new String[0];
  +
       /**
        * The name the component uses to lookup dependency.
        */
  @@ -133,18 +136,17 @@
      /**
       * Returns the set of attribute names available under this descriptor.
       * 
  -    * @return Enumeration an enumeration of the properties names held by the 
  -    *   descriptor.
  +    * @return an array of the properties names held by the descriptor.
       */
  -    public Enumeration getAttributeNames()
  +    public String[] getAttributeNames()
       {
           if( null == m_attributes )
           {
  -            return ComponentInfo.EMPTY_ENUMERATION;
  +            return EMPTY_SET;
           }
           else
           {
  -            return m_attributes.propertyNames();
  +            return (String[]) m_attributes.keySet().toArray( EMPTY_SET );
           }
       }
   }
  
  
  
  1.8       +7 -6      jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/metainfo/ServiceDescriptor.java
  
  Index: ServiceDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/metainfo/ServiceDescriptor.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ServiceDescriptor.java	7 Jun 2002 02:22:17 -0000	1.7
  +++ ServiceDescriptor.java	7 Jun 2002 11:11:26 -0000	1.8
  @@ -30,10 +30,12 @@
    * upon to work in all containers.</p>
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.7 $ $Date: 2002/06/07 02:22:17 $
  + * @version $Revision: 1.8 $ $Date: 2002/06/07 11:11:26 $
    */
   public final class ServiceDescriptor extends AbstractServiceDescriptor
   {
  +    private static final String[] EMPTY_SET = new String[0];
  +
       /**
        * The arbitrary set of attributes associated with service.
        */
  @@ -103,18 +105,17 @@
      /**
       * Returns the set of attribute names available under this descriptor.
       * 
  -    * @return Enumeration an enumeration of the properties names held by the 
  -    *   descriptor.
  +    * @return an array of the properties names held by the descriptor.
       */
  -    public Enumeration getAttributeNames()
  +    public String[] getAttributeNames()
       {
           if( null == m_attributes )
           {
  -            return ComponentInfo.EMPTY_ENUMERATION;
  +            return EMPTY_SET;
           }
           else
           {
  -            return m_attributes.propertyNames();
  +            return (String[]) m_attributes.keySet().toArray( EMPTY_SET );
           }
       }
   }
  
  
  

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