Clover coverage report - PicoContainer - 1.0-alpha-1
Coverage timestamp: Sun Jun 29 2003 20:23:11 BST
file stats: LOC: 32   Methods: 1
NCLOC: 18   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
DefaultComponentFactory.java - 60% 100% 66.7%
coverage 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.html file.                                                    *
 7   
  *                                                                           *
 8   
  * Idea by Rachel Davies, Original code by Aslak Hellesoy and Paul Hammant   *
 9   
  *****************************************************************************/
 10   
 
 11   
 package picocontainer.defaults;
 12   
 
 13   
 import picocontainer.ComponentFactory;
 14   
 import picocontainer.PicoInvocationTargetInitailizationException;
 15   
 
 16   
 import java.lang.reflect.Constructor;
 17   
 import java.lang.reflect.InvocationTargetException;
 18   
 
 19   
 public class DefaultComponentFactory implements ComponentFactory {
 20  54
     public Object createComponent(Class compType, Constructor constructor, Object[] args) throws PicoInvocationTargetInitailizationException {
 21  54
         try {
 22  54
             return constructor.newInstance(args);
 23   
         } catch (InvocationTargetException e) {
 24  1
             throw new PicoInvocationTargetInitailizationException(e.getCause());
 25   
         } catch (InstantiationException e) {
 26  0
             throw new RuntimeException("#1 Can we have a concerted effort to try to force these excptions?");
 27   
         } catch (IllegalAccessException e) {
 28  0
             throw new RuntimeException("#2 Can we have a concerted effort to try to force these excptions?");
 29   
         }
 30   
     }
 31   
 }
 32