Clover coverage report - Code Coverage for hivemind release 1.1-alpha-3
Coverage timestamp: Tue Mar 22 2005 09:10:26 EST
file stats: LOC: 100   Methods: 9
NCLOC: 58   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
ServiceImplementationFactoryParametersImpl.java - 86.7% 77.8% 83.3%
coverage coverage
 1   
 // Copyright 2004, 2005 The Apache Software Foundation
 2   
 //
 3   
 // Licensed under the Apache License, Version 2.0 (the "License");
 4   
 // you may not use this file except in compliance with the License.
 5   
 // You may obtain a copy of the License at
 6   
 //
 7   
 //     http://www.apache.org/licenses/LICENSE-2.0
 8   
 //
 9   
 // Unless required by applicable law or agreed to in writing, software
 10   
 // distributed under the License is distributed on an "AS IS" BASIS,
 11   
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12   
 // See the License for the specific language governing permissions and
 13   
 // limitations under the License.
 14   
 
 15   
 package org.apache.hivemind.impl;
 16   
 
 17   
 import java.util.List;
 18   
 
 19   
 import org.apache.commons.logging.Log;
 20   
 import org.apache.hivemind.ServiceImplementationFactoryParameters;
 21   
 import org.apache.hivemind.ErrorLog;
 22   
 import org.apache.hivemind.internal.Module;
 23   
 import org.apache.hivemind.internal.ServicePoint;
 24   
 import org.apache.hivemind.util.Defense;
 25   
 
 26   
 /**
 27   
  * Wrapper around a {@link org.apache.hivemind.internal.ServicePoint}and a List of parameters,
 28   
  * passed to a {@link org.apache.hivemind.ServiceImplementationFactory}.
 29   
  * 
 30   
  * @author Howard M. Lewis Ship
 31   
  * @since 1.1
 32   
  */
 33   
 public class ServiceImplementationFactoryParametersImpl implements
 34   
         ServiceImplementationFactoryParameters
 35   
 {
 36   
     private ServicePoint _servicePoint;
 37   
 
 38   
     private Module _invokingModule;
 39   
 
 40   
     private List _parameters;
 41   
 
 42  465
     public ServiceImplementationFactoryParametersImpl(ServicePoint servicePoint,
 43   
             Module invokingModule, List parameters)
 44   
     {
 45  465
         Defense.notNull(servicePoint, "servicePoint");
 46  465
         Defense.notNull(invokingModule, "invokingModule");
 47  465
         Defense.notNull(parameters, "parameters");
 48   
 
 49  465
         _servicePoint = servicePoint;
 50  465
         _invokingModule = invokingModule;
 51  465
         _parameters = parameters;
 52   
     }
 53   
 
 54   
     /**
 55   
      * This method is only used in testing.
 56   
      */
 57   
 
 58  1
     public boolean equals(Object other)
 59   
     {
 60  1
         ServiceImplementationFactoryParametersImpl p = (ServiceImplementationFactoryParametersImpl) other;
 61   
 
 62  1
         return _servicePoint == p._servicePoint && _invokingModule == p._invokingModule
 63   
                 && _parameters.equals(p._parameters);
 64   
     }
 65   
 
 66  511
     public String getServiceId()
 67   
     {
 68  511
         return _servicePoint.getExtensionPointId();
 69   
     }
 70   
 
 71  0
     public Class getServiceInterface()
 72   
     {
 73  0
         return _servicePoint.getServiceInterface();
 74   
     }
 75   
 
 76  695
     public Log getLog()
 77   
     {
 78  695
         return _servicePoint.getLog();
 79   
     }
 80   
 
 81  114
     public ErrorLog getErrorLog()
 82   
     {
 83  114
         return _servicePoint.getErrorLog();
 84   
     }
 85   
 
 86  1314
     public Module getInvokingModule()
 87   
     {
 88  1314
         return _invokingModule;
 89   
     }
 90   
 
 91  0
     public List getParameters()
 92   
     {
 93  0
         return _parameters;
 94   
     }
 95   
 
 96  456
     public Object getFirstParameter()
 97   
     {
 98  456
         return _parameters.get(0);
 99   
     }
 100   
 }