Clover coverage report - Code Coverage for hivemind release 1.0
Coverage timestamp: Wed Sep 22 2004 08:05:25 EDT
file stats: LOC: 81   Methods: 6
NCLOC: 40   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
AbstractServiceInvocationDescriptor.java 100% 100% 83.3% 94.7%
coverage coverage
 1   
 //  Copyright 2004 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.parse;
 16   
 
 17   
 import java.util.ArrayList;
 18   
 import java.util.List;
 19   
 
 20   
 import org.apache.hivemind.Element;
 21   
 import org.apache.hivemind.impl.BaseLocatable;
 22   
 import org.apache.hivemind.util.ToStringBuilder;
 23   
 
 24   
 /**
 25   
  * Base class for descriptors that represent invocating a service with parameters.
 26   
  * This is used for the <interceptor> and <invoke-factory> elements.
 27   
  *
 28   
  * @author Howard Lewis Ship
 29   
  */
 30   
 public abstract class AbstractServiceInvocationDescriptor extends BaseLocatable
 31   
 {
 32   
     private String _factoryServiceId;
 33   
 
 34   
     private List _parameters;
 35   
 
 36  830
     public void addParameter(Element parameter)
 37   
     {
 38  830
         if (_parameters == null)
 39  829
             _parameters = new ArrayList();
 40   
     
 41  830
         _parameters.add(parameter);
 42   
     }
 43   
 
 44  858
     public List getParameters()
 45   
     {
 46  858
         return _parameters;
 47   
     }
 48   
 
 49  861
     public String getFactoryServiceId()
 50   
     {
 51  861
         return _factoryServiceId;
 52   
     }
 53   
 
 54  888
     public void setFactoryServiceId(String string)
 55   
     {
 56  888
         _factoryServiceId = string;
 57   
     }
 58   
 
 59  74
     public String toString()
 60   
     {
 61  74
         ToStringBuilder builder = new ToStringBuilder(this);
 62   
     
 63  74
         builder.append("factoryServiceId", _factoryServiceId);
 64  74
         builder.append("parameters", _parameters);
 65   
        
 66  74
         extendDescription(builder);
 67   
     
 68  74
         return builder.toString();
 69   
     }
 70   
     
 71   
     /**
 72   
      * Overridden in subclasses to provide more information about
 73   
      * the instance. This implementation does nothing.
 74   
      */
 75  0
     protected void extendDescription(ToStringBuilder builder)
 76   
     {
 77   
     }
 78   
 
 79   
     
 80   
 }
 81