You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by le...@apache.org on 2003/04/16 16:15:01 UTC

cvs commit: avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/model ContextDirective.java LoggingDirective.java Profile.java

leosimons    2003/04/16 07:15:01

  Modified:    merlin/meta-spi/src/java/org/apache/avalon/meta/info
                        ContextDescriptor.java DependencyDescriptor.java
                        InfoDescriptor.java ReferenceDescriptor.java
                        Service.java Type.java
               merlin/meta-spi/src/java/org/apache/avalon/meta/model
                        ContextDirective.java LoggingDirective.java
                        Profile.java
  Log:
  optimize imports, remove unused stuff.
  
  Revision  Changes    Path
  1.3       +7 -7      avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/info/ContextDescriptor.java
  
  Index: ContextDescriptor.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/info/ContextDescriptor.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ContextDescriptor.java	29 Mar 2003 03:25:58 -0000	1.2
  +++ ContextDescriptor.java	16 Apr 2003 14:15:00 -0000	1.3
  @@ -50,9 +50,9 @@
   
   package org.apache.avalon.meta.info;
   
  -import java.util.Properties;
   import java.util.Arrays;
   import java.util.List;
  +import java.util.Properties;
   
   /**
    * A descriptor describing the Context that the Component
  @@ -137,9 +137,9 @@
   
       /**
        * Return the entry with specified key.  If the supplied key
  -     * corresponds to an alias entry, the key backing the lias will be 
  +     * corresponds to an alias entry, the key backing the lias will be
        * returned.  If the supplied key corresponds to a key, that key
  -     * entry will be returned.  If the key does not correspond with 
  +     * entry will be returned.  If the key does not correspond with
        * wither an elias or key, null is returned.
        *
        * @param key the context entry key to lookup
  @@ -171,12 +171,12 @@
      /**
       * Returns a set of entry descriptors resulting from a merge of the descriptors
       * container in this descriptor with the supplied descriptors.
  -    * 
  +    *
       * @param entries the entries to merge
       * @return the mergerged set of entries
       * @exception IllegalArgumentException if a entry conflict occurs
       */
  -    public EntryDescriptor[] merge( EntryDescriptor[] entries ) 
  +    public EntryDescriptor[] merge( EntryDescriptor[] entries )
         throws IllegalArgumentException
       {
           for( int i=0; i<entries.length; i++ )
  @@ -202,6 +202,6 @@
       {
           List list = Arrays.asList( primary );
           list.addAll( Arrays.asList( secondary ) );
  -        return (EntryDescriptor[]) list.toArray( new EntryDescriptor[0] ); 
  +        return (EntryDescriptor[]) list.toArray( new EntryDescriptor[0] );
       }
   }
  
  
  
  1.3       +3 -4      avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/info/DependencyDescriptor.java
  
  Index: DependencyDescriptor.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/info/DependencyDescriptor.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DependencyDescriptor.java	29 Mar 2003 03:25:58 -0000	1.2
  +++ DependencyDescriptor.java	16 Apr 2003 14:15:00 -0000	1.3
  @@ -51,6 +51,7 @@
   package org.apache.avalon.meta.info;
   
   import java.util.Properties;
  +
   import org.apache.avalon.framework.Version;
   
   /**
  @@ -102,7 +103,7 @@
       /**
        * Creation of a new dependency descriptor using the default 1.0 version
        * @param role the role name that will be used by the type when looking up a service
  -     * @param service the interface service 
  +     * @param service the interface service
        */
       public DependencyDescriptor( final String role, String service )
       {
  @@ -227,8 +228,6 @@
        */
       public boolean equals( Object other )
       {
  -        boolean match = false;
  -
           if( other instanceof DependencyDescriptor )
           {
               DependencyDescriptor dep = (DependencyDescriptor) other;
  
  
  
  1.3       +2 -1      avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/info/InfoDescriptor.java
  
  Index: InfoDescriptor.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/info/InfoDescriptor.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InfoDescriptor.java	15 Apr 2003 03:04:45 -0000	1.2
  +++ InfoDescriptor.java	16 Apr 2003 14:15:00 -0000	1.3
  @@ -51,6 +51,7 @@
   package org.apache.avalon.meta.info;
   
   import java.util.Properties;
  +
   import org.apache.avalon.framework.Version;
   
   /**
  
  
  
  1.4       +6 -5      avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/info/ReferenceDescriptor.java
  
  Index: ReferenceDescriptor.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/info/ReferenceDescriptor.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ReferenceDescriptor.java	10 Apr 2003 04:36:14 -0000	1.3
  +++ ReferenceDescriptor.java	16 Apr 2003 14:15:00 -0000	1.4
  @@ -51,6 +51,7 @@
   package org.apache.avalon.meta.info;
   
   import java.io.Serializable;
  +
   import org.apache.avalon.framework.Version;
   
   /**
  @@ -113,7 +114,7 @@
           }
   
           m_classname = classname;
  -    
  +
           if( null == version )
           {
               m_version = Version.getVersion( "1.0" );
  @@ -153,7 +154,7 @@
        */
       public boolean matches( final ReferenceDescriptor other )
       {
  -        return other.getClassname().equals( getClassname() ) 
  +        return other.getClassname().equals( getClassname() )
               && other.getVersion().complies( getVersion() );
       }
   
  @@ -203,9 +204,9 @@
       }
   
      /**
  -    * Creation of a new reference descriptor form a supplied string. 
  +    * Creation of a new reference descriptor form a supplied string.
       * The implementation looks for the classname/version delimiter
  -    * of ":". If no version information is found, the default 1.0.0 
  +    * of ":". If no version information is found, the default 1.0.0
       * version is assigned.
       *
       * @param path the structured path in for form <classname>:<version>
  
  
  
  1.2       +4 -9      avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/info/Service.java
  
  Index: Service.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/info/Service.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Service.java	13 Mar 2003 01:06:19 -0000	1.1
  +++ Service.java	16 Apr 2003 14:15:00 -0000	1.2
  @@ -51,6 +51,7 @@
   package org.apache.avalon.meta.info;
   
   import java.util.Properties;
  +
   import org.apache.avalon.framework.Version;
   
   /**
  @@ -63,12 +64,6 @@
   public class Service extends Descriptor
   {
       //=========================================================================
  -    // static
  -    //=========================================================================
  -
  -    private static final Version DEFAULT_VERSION = Version.getVersion( "1.0" );
  -
  -    //=========================================================================
       // state
       //=========================================================================
   
  @@ -219,7 +214,7 @@
       /**
        * Compare this object to the supplied object for equality.
        * @param other the object to compare to this object
  -     * @return true if this object matches the supplied object 
  +     * @return true if this object matches the supplied object
        *    in terms of service classname and version
        */
       public boolean equals( Object other )
  @@ -233,7 +228,7 @@
           else if( other instanceof Service )
           {
               Service ref = (Service)other;
  -            match = ref.getClassname().equals( getClassname() ) 
  +            match = ref.getClassname().equals( getClassname() )
                 && ref.getVersion().complies( getVersion() );
           }
   
  
  
  
  1.4       +2 -4      avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/info/Type.java
  
  Index: Type.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/info/Type.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Type.java	2 Apr 2003 15:58:39 -0000	1.3
  +++ Type.java	16 Apr 2003 14:15:00 -0000	1.4
  @@ -50,8 +50,8 @@
   
   package org.apache.avalon.meta.info;
   
  -import java.io.InputStream;
   import java.io.Serializable;
  +
   import org.apache.avalon.framework.configuration.Configuration;
   
   /**
  @@ -85,8 +85,6 @@
       private final ExtensionDescriptor[] m_extensions;
   
       private transient Configuration m_configuration;
  -    private transient boolean m_loaded = false;
  -
       /**
        * Creation of a new Type instance using a supplied component descriptor,
        * logging, cotext, services, depedencies, stages and extension descriptors.
  
  
  
  1.2       +2 -7      avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/model/ContextDirective.java
  
  Index: ContextDirective.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/model/ContextDirective.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ContextDirective.java	13 Mar 2003 01:06:24 -0000	1.1
  +++ ContextDirective.java	16 Apr 2003 14:15:01 -0000	1.2
  @@ -50,7 +50,7 @@
   
   package org.apache.avalon.meta.model;
   
  -import org.apache.avalon.framework.context.Context;
  +
   
   /**
    * A context descriptor declares the context creation criteria for
  @@ -101,11 +101,6 @@
        * The context implementation classname.
        */
       private final String m_classname;
  -
  -    /**
  -     * Cached reference to created context value.
  -     */
  -    private Context m_context;
   
       /**
        * Creation of a new file target.
  
  
  
  1.2       +1 -13     avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/model/LoggingDirective.java
  
  Index: LoggingDirective.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/model/LoggingDirective.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LoggingDirective.java	13 Mar 2003 01:06:27 -0000	1.1
  +++ LoggingDirective.java	16 Apr 2003 14:15:01 -0000	1.2
  @@ -70,16 +70,6 @@
       private Category[] m_categories;
   
       /**
  -     * The default priority.
  -     */
  -    private String m_priority;
  -
  -    /**
  -     * The default target.
  -     */
  -    private String m_target;
  -
  -    /**
        * Create a LoggingDirective instance.
        *
        * @param name the base category name
  @@ -113,8 +103,6 @@
                                    final Category[] categories )
       {
           super( name, priority, target );
  -        m_priority = priority;
  -        m_target = target;
           m_categories = categories;
       }
   
  
  
  
  1.2       +7 -14     avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/model/Profile.java
  
  Index: Profile.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/model/Profile.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Profile.java	13 Mar 2003 01:06:30 -0000	1.1
  +++ Profile.java	16 Apr 2003 14:15:01 -0000	1.2
  @@ -50,16 +50,14 @@
   
   package org.apache.avalon.meta.model;
   
  -import java.io.InputStream;
   import java.io.Serializable;
  -import org.apache.avalon.framework.configuration.Configurable;
  +
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.DefaultConfiguration;
  -import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.meta.info.Type;
   import org.apache.excalibur.configuration.CascadingConfiguration;
   import org.apache.excalibur.configuration.ConfigurationUtil;
  -import org.apache.avalon.meta.info.Type;
   
   /**
    * Definition of the criteria for an explicit component profile.  A profile, when
  @@ -100,7 +98,7 @@
    will normally qualify it's instantiation criteria through a configuration declaration.
    Any context values defined at this level will override context values supplied by the
    container.  The following two context directives for "location" and "home" demonstrate
  - programatics creation of context values.  The first entry declares that the context 
  + programatics creation of context values.  The first entry declares that the context
    value to be assigned to the key "location" shall be the String value "Paris".  The second
    context enty assignes the container's context value for "urn:avalon:home" to the component's
    context key of "home".
  @@ -166,11 +164,6 @@
       private final Configuration m_configuration;
   
       /**
  -     * The derived configuration
  -     */
  -    private Configuration m_config;
  -
  -    /**
        * The configuration for component (if any).
        */
       private final ContextDirective m_context;
  @@ -226,7 +219,7 @@
        * @param activation the profile activation policy
        * @param template the profile to use as a template
        */
  -    public Profile( final String name, boolean activation, final Profile template )
  +    public Profile( final String name, final Profile template )
       {
           this(
               name,
  @@ -235,7 +228,7 @@
               template.getContext(),
               template.getCategories(),
               template.getType(),
  -            Mode.EXPLICIT 
  +            Mode.EXPLICIT
           );
       }
   
  @@ -270,7 +263,7 @@
           else
           {
               if( mode.equals( Mode.PACKAGED ) )
  -            { 
  +            {
                   if( type.getInfo().getName().equals( name ) )
                   {
                       m_name = type.getInfo().getName();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org