Clover coverage report - PicoContainer - 1.1
Coverage timestamp: Thu Nov 4 2004 11:55:45 CST
file stats: LOC: 148   Methods: 27
NCLOC: 97   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
AbstractDelegatingMutablePicoContainer.java - 96.4% 96.3% 96.4%
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.txt file.                                                     *
 7   
  *                                                                           *
 8   
  * Original code by the committers                                           *
 9   
  *****************************************************************************/
 10   
 package org.picocontainer.alternatives;
 11   
 
 12   
 import org.picocontainer.ComponentAdapter;
 13   
 import org.picocontainer.MutablePicoContainer;
 14   
 import org.picocontainer.Parameter;
 15   
 import org.picocontainer.PicoContainer;
 16   
 import org.picocontainer.PicoException;
 17   
 import org.picocontainer.PicoRegistrationException;
 18   
 import org.picocontainer.PicoVerificationException;
 19   
 import org.picocontainer.PicoVisitor;
 20   
 
 21   
 import java.io.Serializable;
 22   
 import java.util.Collection;
 23   
 import java.util.List;
 24   
 
 25   
 /**
 26   
  * @author Paul Hammant
 27   
  * @version $Revision: 1.1 $
 28   
  */
 29   
 public abstract class AbstractDelegatingMutablePicoContainer implements MutablePicoContainer, Serializable {
 30   
 
 31   
     private MutablePicoContainer delegate;
 32   
 
 33  364
     public AbstractDelegatingMutablePicoContainer(MutablePicoContainer delegate) {
 34  364
         this.delegate = delegate;
 35   
     }
 36   
 
 37  106
     protected MutablePicoContainer getDelegate() {
 38  106
         return delegate;
 39   
     }
 40   
 
 41  18
     public ComponentAdapter registerComponentImplementation(Object componentKey, Class componentImplementation) throws PicoRegistrationException {
 42  18
         return delegate.registerComponentImplementation(componentKey, componentImplementation);
 43   
     }
 44   
 
 45  6
     public ComponentAdapter registerComponentImplementation(Object componentKey, Class componentImplementation, Parameter[] parameters) throws PicoRegistrationException {
 46  6
         return delegate.registerComponentImplementation(componentKey, componentImplementation, parameters);
 47   
     }
 48   
 
 49   
 
 50  148
     public ComponentAdapter registerComponentImplementation(Class componentImplementation) throws PicoRegistrationException {
 51  148
         return delegate.registerComponentImplementation(componentImplementation);
 52   
     }
 53   
 
 54  64
     public ComponentAdapter registerComponentInstance(Object componentInstance) throws PicoRegistrationException {
 55  64
         return delegate.registerComponentInstance(componentInstance);
 56   
     }
 57   
 
 58  62
     public ComponentAdapter registerComponentInstance(Object componentKey, Object componentInstance) throws PicoRegistrationException {
 59  62
         return delegate.registerComponentInstance(componentKey, componentInstance);
 60   
     }
 61   
 
 62  92
     public ComponentAdapter registerComponent(ComponentAdapter componentAdapter) throws PicoRegistrationException {
 63  92
         return delegate.registerComponent(componentAdapter);
 64   
     }
 65   
 
 66  16
     public ComponentAdapter unregisterComponent(Object componentKey) {
 67  16
         return delegate.unregisterComponent(componentKey);
 68   
     }
 69   
 
 70  8
     public ComponentAdapter unregisterComponentByInstance(Object componentInstance) {
 71  8
         return delegate.unregisterComponentByInstance(componentInstance);
 72   
     }
 73   
 
 74  196
     public Object getComponentInstance(Object componentKey) {
 75  196
         return delegate.getComponentInstance(componentKey);
 76   
     }
 77   
 
 78  24
     public Object getComponentInstanceOfType(Class componentType) {
 79  24
         return delegate.getComponentInstanceOfType(componentType);
 80   
     }
 81   
 
 82  72
     public List getComponentInstances() {
 83  72
         return delegate.getComponentInstances();
 84   
     }
 85   
 
 86  16
     public PicoContainer getParent() {
 87  16
         return delegate.getParent();
 88   
     }
 89   
 
 90  72
     public ComponentAdapter getComponentAdapter(Object componentKey) {
 91  72
         return delegate.getComponentAdapter(componentKey);
 92   
     }
 93   
 
 94  8
     public ComponentAdapter getComponentAdapterOfType(Class componentType) {
 95  8
         return delegate.getComponentAdapterOfType(componentType);
 96   
     }
 97   
 
 98  16
     public Collection getComponentAdapters() {
 99  16
         return delegate.getComponentAdapters();
 100   
     }
 101   
 
 102  8
     public List getComponentAdaptersOfType(Class componentType) {
 103  8
         return delegate.getComponentAdaptersOfType(componentType);
 104   
     }
 105   
 
 106   
     /**
 107   
      * @deprecated since 1.1 - Use new VerifyingVisitor().traverse(this)
 108   
      */
 109  0
    public void verify() throws PicoVerificationException {
 110  0
         delegate.verify();
 111   
     }
 112   
 
 113  40
     public void start() {
 114  40
         delegate.start();
 115   
     }
 116   
 
 117  32
     public void stop() {
 118  32
         delegate.stop();
 119   
     }
 120   
 
 121  32
     public void dispose() {
 122  32
         delegate.dispose();
 123   
     }
 124   
 
 125  22
     public boolean addChildContainer(PicoContainer child) {
 126  22
         return delegate.addChildContainer(child);
 127   
     }
 128   
 
 129  8
     public boolean removeChildContainer(PicoContainer child) {
 130  8
         return delegate.removeChildContainer(child);
 131   
     }
 132   
 
 133  82
     public void accept(PicoVisitor visitor) {
 134  82
         delegate.accept(visitor);
 135   
     }
 136   
 
 137  8
     public List getComponentInstancesOfType(Class type) throws PicoException {
 138  8
         return delegate.getComponentInstancesOfType(type);
 139   
     }
 140   
 
 141  18
     public boolean equals(Object obj) {
 142   
         // required to make it pass on both jdk 1.3 and jdk 1.4. Btw, what about overriding hashCode()? (AH)
 143  18
         final boolean result = delegate.equals(obj) || this == obj;
 144  18
         return result;
 145   
     }
 146   
 
 147   
 }
 148