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/containerkit/src/java/org/apache/excalibur/containerkit/metainfo ComponentDescriptor.java
Date Sun, 09 Jun 2002 00:27:02 GMT
donaldp     2002/06/08 17:27:02

  Modified:    containerkit/src/java/org/apache/excalibur/containerkit/metainfo
                        ComponentDescriptor.java
  Log:
  Extend FeatureDescriptor
  
  Revision  Changes    Path
  1.9       +4 -64     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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ComponentDescriptor.java	7 Jun 2002 11:11:26 -0000	1.8
  +++ ComponentDescriptor.java	9 Jun 2002 00:27:02 -0000	1.9
  @@ -7,9 +7,8 @@
    */
   package org.apache.excalibur.containerkit.metainfo;
   
  -import org.apache.avalon.framework.Version;
   import java.util.Properties;
  -import java.util.Enumeration;
  +import org.apache.avalon.framework.Version;
   
   /**
    * This class is used to provide explicit information to assembler
  @@ -50,12 +49,11 @@
    * </pre>
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.8 $ $Date: 2002/06/07 11:11:26 $
  + * @version $Revision: 1.9 $ $Date: 2002/06/09 00:27:02 $
    */
   public final class ComponentDescriptor
  +    extends FeatureDescriptor
   {
  -    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
  @@ -78,22 +76,17 @@
        */
       private final Version m_version;
   
  -    /**
  -     * The arbitrary set of attributes associated with Component.
  -     */
  -    private final Properties m_attributes;
  -
       public ComponentDescriptor( final String name,
                                   final String displayName,
                                   final String classname,
                                   final Version version,
                                   final Properties attributes )
       {
  +        super( attributes );
           m_name = name;
           m_displayName = displayName;
           m_classname = classname;
           m_version = version;
  -        m_attributes = attributes;
       }
   
       /**
  @@ -135,57 +128,4 @@
       {
           return m_version;
       }
  -
  -    /**
  -     * Return the attribute for specified key.
  -     *
  -     * @return the attribute for specified key.
  -     */
  -    public String getAttribute( final String key )
  -    {
  -        if( null == m_attributes )
  -        {
  -            return null;
  -        }
  -        else
  -        {
  -            return m_attributes.getProperty( key );
  -        }
  -    }
  -
  -    /**
  -     * Return the attribute for specified key.
  -     *
  -     * @return the attribute for specified key.
  -     */
  -    public String getAttribute( final String key,
  -                                final String defaultValue )
  -    {
  -        if( null == m_attributes )
  -        {
  -            return defaultValue;
  -        }
  -        else
  -        {
  -            return m_attributes.getProperty( key, defaultValue );
  -        }
  -    }
  -
  -   /**
  -    * Returns the set of attribute names available under this descriptor.
  -    * 
  -    * @return an array of the properties names held by the descriptor.
  -    */
  -    public String[] getAttributeNames()
  -    {
  -        if( null == m_attributes )
  -        {
  -            return EMPTY_SET;
  -        }
  -        else
  -        {
  -            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