Clover coverage report - PicoContainer - 1.0-RC-1
Coverage timestamp: Tue May 18 2004 16:19:33 EDT
file stats: LOC: 47   Methods: 1
NCLOC: 11   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
SetterInjectionComponentAdapterFactory.java - 100% 100% 100%
coverage
 1   
 /*****************************************************************************
 2   
  * Copyright (c) PicoContainer Organization. All rights reserved.            *
 3   
  * ------------------------------------------------------------------------- *
 4   
  * The software in this package is published under the terms of the BSD      *
 5   
  * style license a copy of which has been included with this distribution in *
 6   
  * the LICENSE.txt file.                                                     *
 7   
  *                                                                           *
 8   
  * Idea by Rachel Davies, Original code by Aslak Hellesoy and Paul Hammant   *
 9   
  *****************************************************************************/
 10   
 
 11   
 package org.picocontainer.defaults;
 12   
 
 13   
 import java.io.Serializable;
 14   
 
 15   
 import org.picocontainer.ComponentAdapter;
 16   
 import org.picocontainer.Parameter;
 17   
 import org.picocontainer.PicoIntrospectionException;
 18   
 
 19   
 
 20   
 /**
 21   
  * A {@link ComponentAdapterFactory} for JavaBeans.
 22   
  * The factory creates {@link SetterInjectionComponentAdapter}.
 23   
  *
 24   
  * @author Jörg Schaible
 25   
  * @version $Revision: 1.2 $
 26   
  */
 27   
 public class SetterInjectionComponentAdapterFactory implements ComponentAdapterFactory, Serializable {
 28   
     /**
 29   
      * Create a {@link SetterInjectionComponentAdapter}.
 30   
      * @param componentKey The component's key
 31   
      * @param componentImplementation The class of the bean.
 32   
      * @param parameters Any parameters for the setters. If null the adapter solves the
 33   
      * dependencies for all setters internally. Otherwise the number parameters must match
 34   
      * the number of the setter.
 35   
      * @return Returns a new {@link SetterInjectionComponentAdapter}.
 36   
      * @throws PicoIntrospectionException if dependencies cannot be solved
 37   
      * @throws AssignabilityRegistrationException if  the <code>componentKey</code> is a type
 38   
      * that does not match the implementation
 39   
      * @throws NotConcreteRegistrationException if the implementation is an interface or an
 40   
      * abstract class.
 41   
      */
 42  13
     public ComponentAdapter createComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters)
 43   
             throws PicoIntrospectionException, AssignabilityRegistrationException, NotConcreteRegistrationException {
 44  13
         return new SetterInjectionComponentAdapter(componentKey, componentImplementation, parameters);
 45   
     }
 46   
 }
 47