2009/04/15 - Apache HiveMind has been retired.

For more information, please explore the Attic.

Clover coverage report - Code Coverage for hivemind release 1.2.1
Coverage timestamp: Fri Feb 10 2006 16:33:43 PST
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  1314 public void setInstanceClassName(String string)
 41    {
 42  1314 _instanceClassName = string;
 43    }
 44   
 45  1280 public ServiceImplementationConstructor createConstructor(
 46    ServicePoint point,
 47    Module contributingModule)
 48    {
 49  1280 CreateClassServiceConstructor result = new CreateClassServiceConstructor();
 50   
 51  1280 result.setLocation(getLocation());
 52  1280 result.setContributingModule(contributingModule);
 53  1280 result.setInstanceClassName(_instanceClassName);
 54   
 55  1280 return result;
 56    }
 57   
 58  131 public String toString()
 59    {
 60  131 ToStringBuilder builder = new ToStringBuilder(this);
 61   
 62  131 builder.append("instanceClassName", _instanceClassName);
 63  131 builder.append("serviceModel", _serviceModel);
 64   
 65  131 return builder.toString();
 66    }
 67   
 68  1308 public String getServiceModel()
 69    {
 70  1308 return _serviceModel;
 71    }
 72   
 73  1314 public void setServiceModel(String serviceModel)
 74    {
 75  1314 _serviceModel = serviceModel;
 76    }
 77   
 78    }