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: 78   Methods: 6
NCLOC: 45   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
CreateInstanceDescriptor.java - 100% 100% 100%
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 org.apache.hivemind.impl.BaseLocatable;
 18    import org.apache.hivemind.impl.CreateClassServiceConstructor;
 19    import org.apache.hivemind.internal.Module;
 20    import org.apache.hivemind.internal.ServicePoint;
 21    import org.apache.hivemind.internal.ServiceImplementationConstructor;
 22    import org.apache.hivemind.util.ToStringBuilder;
 23   
 24    /**
 25    * Descriptor for the <create-instance< element, used to create
 26    * a core service implementation from a class name.
 27    *
 28    * @author Howard Lewis Ship
 29    */
 30    public final class CreateInstanceDescriptor extends BaseLocatable implements InstanceBuilder
 31    {
 32    private String _serviceModel = "singleton";
 33    private String _instanceClassName;
 34   
 35  23 public String getInstanceClassName()
 36    {
 37  23 return _instanceClassName;
 38    }
 39   
 40  1192 public void setInstanceClassName(String string)
 41    {
 42  1192 _instanceClassName = string;
 43    }
 44   
 45  1158 public ServiceImplementationConstructor createConstructor(
 46    ServicePoint point,
 47    Module contributingModule)
 48    {
 49  1158 CreateClassServiceConstructor result = new CreateClassServiceConstructor();
 50   
 51  1158 result.setLocation(getLocation());
 52  1158 result.setContributingModule(contributingModule);
 53  1158 result.setInstanceClassName(_instanceClassName);
 54   
 55  1158 return result;
 56    }
 57   
 58  118 public String toString()
 59    {
 60  118 ToStringBuilder builder = new ToStringBuilder(this);
 61   
 62  118 builder.append("instanceClassName", _instanceClassName);
 63  118 builder.append("serviceModel", _serviceModel);
 64   
 65  118 return builder.toString();
 66    }
 67   
 68  1186 public String getServiceModel()
 69    {
 70  1186 return _serviceModel;
 71    }
 72   
 73  1192 public void setServiceModel(String serviceModel)
 74    {
 75  1192 _serviceModel = serviceModel;
 76    }
 77   
 78    }