Clover coverage report - Code Coverage for hivemind release 1.0-rc-2
Coverage timestamp: Sat Sep 11 2004 09:09:48 EDT
file stats: LOC: 79   Methods: 6
NCLOC: 45   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
CreateInstanceDescriptor.java - 100% 100% 100%
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 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  1
     public String getInstanceClassName()
 36   
     {
 37  1
         return _instanceClassName;
 38   
     }
 39   
 
 40  726
     public void setInstanceClassName(String string)
 41   
     {
 42  726
         _instanceClassName = string;
 43   
     }
 44   
 
 45  716
     public ServiceImplementationConstructor createConstructor(
 46   
         ServicePoint point,
 47   
         Module contributingModule)
 48   
     {
 49  716
         CreateClassServiceConstructor result = new CreateClassServiceConstructor();
 50   
 
 51  716
         result.setLocation(getLocation());
 52  716
         result.setContributingModule(contributingModule);
 53  716
         result.setInstanceClassName(_instanceClassName);
 54   
 
 55  716
         return result;
 56   
     }
 57   
 
 58  64
     public String toString()
 59   
     {
 60  64
         ToStringBuilder builder = new ToStringBuilder(this);
 61   
 
 62  64
         builder.append("instanceClassName", _instanceClassName);
 63  64
         builder.append("serviceModel", _serviceModel);
 64   
 
 65  64
         return builder.toString();
 66   
     }
 67   
 
 68  716
     public String getServiceModel()
 69   
     {
 70  716
         return _serviceModel;
 71   
     }
 72   
 
 73  726
     public void setServiceModel(String serviceModel)
 74   
     {
 75  726
         _serviceModel = serviceModel;
 76   
     }
 77   
 
 78   
 }
 79