Clover coverage report - PicoContainer - 1.0-alpha-2
Coverage timestamp: Thu Jul 10 2003 10:40:43 BST
file stats: LOC: 74   Methods: 0
NCLOC: 15   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
ClassRegistrationPicoContainer.java - - - -
coverage
 1   
 /*****************************************************************************
 2   
  * Copyright (Cc) 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 picocontainer;
 12   
 
 13   
 import picocontainer.defaults.Parameter;
 14   
 
 15   
 public interface ClassRegistrationPicoContainer extends PicoContainer {
 16   
 
 17   
     /**
 18   
      * Registers a component. Same as calling {@link #registerComponent(java.lang.Class, java.lang.Class)}
 19   
      * with the same argument.
 20   
      *
 21   
      * @param componentImplementation The class of the component to instantiate
 22   
      * @throws PicoRegistrationException If a registration problem
 23   
      */
 24   
     void registerComponent(Class componentImplementation)
 25   
             throws PicoRegistrationException, PicoIntrospectionException;
 26   
 
 27   
     /**
 28   
      * Alternate way of registering components with additional
 29   
      * component type.
 30   
      *
 31   
      * @param componentType Component type
 32   
      * @param componentImplementation The class of the component to instantiate
 33   
      * @throws PicoRegistrationException If a registration problem
 34   
      */
 35   
     void registerComponent(Class componentType, Class componentImplementation)
 36   
             throws PicoRegistrationException, PicoIntrospectionException;
 37   
 
 38   
     /**
 39   
      * Registers a component that is instantiated and configured outside
 40   
      * the container. Useful in cases where pico doesn't have sufficient
 41   
      * knowledge to instantiate a component.
 42   
      *
 43   
      * @param componentType Component type
 44   
      * @param component preinstantiated component
 45   
      * @throws PicoRegistrationException If a registration problem
 46   
      */
 47   
     void registerComponent(Class componentType, Object component)
 48   
             throws PicoRegistrationException;
 49   
 
 50   
     /**
 51   
      * Registers an instantiated component.  This might be because you are
 52   
      * creating trees of Pico containers or if you have a class that you want treated
 53   
      * as a component, but is not Pico component compatible.
 54   
      * @param component The pre instantiated component to register
 55   
      * @throws PicoRegistrationException
 56   
      */
 57   
     void registerComponent(Object component)
 58   
             throws PicoRegistrationException;
 59   
 
 60   
     // TODO: move Parameter to this package. We shouldn't depend on subpackages.
 61   
     void registerComponent(Class componentImplementation, Class componentType, Parameter[] parameters)
 62   
             throws PicoRegistrationException;
 63   
 
 64   
     /**
 65   
      * Add a parameter to a component. Used for configuring them.
 66   
      * Very liekly to change before release.
 67   
      * @param componentType The component type
 68   
      * @param parameter The parameter it pertains to
 69   
      * @param arg The argukemt to pass in.
 70   
      */
 71   
     void addParameterToComponent(Class componentType, Class parameter, Object arg) throws PicoIntrospectionException;
 72   
 
 73   
 }
 74