Clover coverage report - Code Coverage for hivemind release 1.1-rc-1
Coverage timestamp: Fri Sep 23 2005 10:46:55 EDT
file stats: LOC: 80   Methods: 6
NCLOC: 40   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
AbstractServiceInvocationDescriptor.java 100% 100% 83.3% 94.7%
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.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  1307 public void addParameter(Element parameter)
 37    {
 38  1307 if (_parameters == null)
 39  1306 _parameters = new ArrayList();
 40   
 41  1307 _parameters.add(parameter);
 42    }
 43   
 44  1458 public List getParameters()
 45    {
 46  1458 return _parameters;
 47    }
 48   
 49  1487 public String getFactoryServiceId()
 50    {
 51  1487 return _factoryServiceId;
 52    }
 53   
 54  1494 public void setFactoryServiceId(String string)
 55    {
 56  1494 _factoryServiceId = string;
 57    }
 58   
 59  132 public String toString()
 60    {
 61  132 ToStringBuilder builder = new ToStringBuilder(this);
 62   
 63  132 builder.append("factoryServiceId", _factoryServiceId);
 64  132 builder.append("parameters", _parameters);
 65   
 66  132 extendDescription(builder);
 67   
 68  132 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    }