You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2002/09/15 02:31:52 UTC

cvs commit: jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info Type.java

mcconnell    2002/09/14 17:31:52

  Modified:    meta/src/java/org/apache/excalibur/meta/info Type.java
  Log:
  Enhanced service request accesors.
  
  Revision  Changes    Path
  1.4       +20 -1     jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/Type.java
  
  Index: Type.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/Type.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Type.java	13 Sep 2002 20:31:22 -0000	1.3
  +++ Type.java	15 Sep 2002 00:31:52 -0000	1.4
  @@ -178,6 +178,25 @@
       }
   
       /**
  +     * Retrieve a service with a particular reference.
  +     *
  +     * @param classname the service classname
  +     * @return the service descriptor or null if it does not exist
  +     */
  +    public ServiceDescriptor getService( final ReferenceDescriptor reference )
  +    {
  +        for( int i = 0; i < m_services.length; i++ )
  +        {
  +            final ServiceDescriptor service = m_services[i];
  +            if( service.getReference().matches( reference ) )
  +            {
  +                return service;
  +            }
  +        }
  +        return null;
  +    }
  +
  +    /**
        * Retrieve a service with a particular classname.
        *
        * @param classname the service classname
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>