Clover coverage report - picocontainer - 1.2-beta-1
Coverage timestamp: Sun May 29 2005 14:29:04 BST
file stats: LOC: 147   Methods: 27
NCLOC: 97   Classes: 1
 
 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: 1802 $
 28    */
 29    public abstract class AbstractDelegatingMutablePicoContainer implements MutablePicoContainer, Serializable {
 30   
 31    private MutablePicoContainer delegate;
 32   
 33  374 public AbstractDelegatingMutablePicoContainer(MutablePicoContainer delegate) {
 34  374 this.delegate = delegate;
 35    }
 36   
 37  128 protected MutablePicoContainer getDelegate() {
 38  128 return delegate;
 39    }
 40   
 41  20 public ComponentAdapter registerComponentImplementation(Object componentKey, Class componentImplementation) throws PicoRegistrationException {
 42  20 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  56 public ComponentAdapter registerComponentInstance(Object componentInstance) throws PicoRegistrationException {
 55  56 return delegate.registerComponentInstance(componentInstance);
 56    }
 57   
 58  54 public ComponentAdapter registerComponentInstance(Object componentKey, Object componentInstance) throws PicoRegistrationException {
 59  54 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  8 public ComponentAdapter unregisterComponent(Object componentKey) {
 67  8 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  76 public void start() {
 114  76 delegate.start();
 115    }
 116   
 117  50 public void stop() {
 118  50 delegate.stop();
 119    }
 120   
 121  50 public void dispose() {
 122  50 delegate.dispose();
 123    }
 124   
 125  24 public boolean addChildContainer(PicoContainer child) {
 126  24 return delegate.addChildContainer(child);
 127    }
 128   
 129  8 public boolean removeChildContainer(PicoContainer child) {
 130  8 return delegate.removeChildContainer(child);
 131    }
 132   
 133  28 public void accept(PicoVisitor visitor) {
 134  28 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    }