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/08/22 12:20:10 UTC

cvs commit: jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly TypeRegistry.java

mcconnell    2002/08/22 03:20:09

  Modified:    assembly/src/java/org/apache/excalibur/merlin/assembly
                        TypeRegistry.java
  Log:
  checkstyle ok
  
  Revision  Changes    Path
  1.10      +17 -10    jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/TypeRegistry.java
  
  Index: TypeRegistry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/TypeRegistry.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TypeRegistry.java	21 Aug 2002 17:00:51 -0000	1.9
  +++ TypeRegistry.java	22 Aug 2002 10:20:09 -0000	1.10
  @@ -13,22 +13,16 @@
   import java.util.Hashtable;
   import java.util.Vector;
   import java.util.Iterator;
  -import org.apache.avalon.framework.CascadingException;
   import org.apache.avalon.framework.logger.Logger;
  -import org.apache.avalon.framework.logger.LogEnabled;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.excalibur.meta.info.ServiceDescriptor;
   import org.apache.excalibur.meta.info.ReferenceDescriptor;
  -import org.apache.excalibur.meta.info.DependencyDescriptor;
   import org.apache.excalibur.meta.info.Type;
   import org.apache.excalibur.meta.info.StageDescriptor;
   import org.apache.excalibur.meta.info.ExtensionDescriptor;
   import org.apache.excalibur.meta.info.builder.TypeBuilder;
   import org.apache.excalibur.meta.info.builder.BlockBuilder;
  -import org.apache.excalibur.merlin.model.Profile;
   import org.apache.excalibur.meta.verifier.ComponentVerifier;
  -import org.apache.excalibur.configuration.ConfigurationUtil;
   
   /**
    * Internal table that holds available component type keyed relative
  @@ -95,7 +89,9 @@
       {
           Type type = getType( classname );
           if( type != null ) 
  -          return true;
  +        {
  +            return true;
  +        }
           return false;
       }
   
  @@ -159,6 +155,11 @@
       // TypeRegistry (private and protected)
       //=======================================================================
   
  +   /**
  +    * Return the set of classes for a given type.
  +    * @param type the component type
  +    * @return an array of classes represnting the type's service interfaces
  +    */
       protected Class[] getServiceClasses( Type type )
       {
           Vector vector = new Vector();
  @@ -174,11 +175,14 @@
       * Returns the component type implementation class.
       * @param type the component type descriptor
       * @return the class implementing the component type
  +    * @exception TypeException if a classloader error occurs
       */
       protected Class getComponentClass( Type type ) throws TypeException
       {
           if( null == type )
  -          throw new NullPointerException("Illegal null component type argument.");
  +        {
  +            throw new NullPointerException("Illegal null component type argument.");
  +        }
   
           final String classname = type.getInfo().getImplementationKey();
           try
  @@ -197,6 +201,7 @@
       * Returns the service type implementation class.
       * @param service the service type descriptor
       * @return the class implementing the service type
  +    * @exception TypeRuntimeException if a classloader error occurs
       */
       protected Class getServiceClass( ServiceDescriptor service ) throws TypeRuntimeException
       {
  @@ -316,7 +321,9 @@
           {
               table = (TypeTable) iterator.next();
               if( table.matches( service ) )
  -              return table;
  +            {
  +                return table;
  +            }
           }
   
           // otherwise create a new table
  
  
  

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