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: 134   Methods: 15
NCLOC: 87   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
ModuleDescriptor.java 87.5% 100% 100% 98%
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.ClassResolver;
 21   
 import org.apache.hivemind.impl.BaseLocatable;
 22   
 import org.apache.hivemind.util.ToStringBuilder;
 23   
 
 24   
 /**
 25   
  * Representation of a HiveMind module descriptor, as parsed
 26   
  * by {@link org.apache.hivemind.parse.DescriptorParser}.
 27   
  * Corresponds to the root <module> element. 
 28   
  *
 29   
  * @author Howard Lewis Ship
 30   
  */
 31   
 public final class ModuleDescriptor extends BaseLocatable
 32   
 {
 33   
     private String _moduleId;
 34   
     private String _version;
 35   
     private List _servicePoints;
 36   
     private List _implementations;
 37   
     private List _configurationPoints;
 38   
     private List _contributions;
 39   
     private ClassResolver _resolver;
 40   
 
 41  21
     public String toString()
 42   
     {
 43  21
         ToStringBuilder builder = new ToStringBuilder(this);
 44   
 
 45  21
         builder.append("moduleId", _moduleId);
 46  21
         builder.append("version", _version);
 47   
 
 48  21
         return builder.toString();
 49   
     }
 50   
 
 51  1565
     public void addServicePoint(ServicePointDescriptor service)
 52   
     {
 53  1565
         if (_servicePoints == null)
 54  162
             _servicePoints = new ArrayList();
 55   
 
 56  1565
         _servicePoints.add(service);
 57   
     }
 58   
 
 59  197
     public List getServicePoints()
 60   
     {
 61  197
         return _servicePoints;
 62   
     }
 63   
 
 64  13
     public void addImplementation(ImplementationDescriptor descriptor)
 65   
     {
 66  13
         if (_implementations == null)
 67  13
             _implementations = new ArrayList();
 68   
 
 69  13
         _implementations.add(descriptor);
 70   
     }
 71   
 
 72  195
     public List getImplementations()
 73   
     {
 74  195
         return _implementations;
 75   
     }
 76   
 
 77  836
     public void addConfigurationPoint(ConfigurationPointDescriptor descriptor)
 78   
     {
 79  836
         if (_configurationPoints == null)
 80  157
             _configurationPoints = new ArrayList();
 81   
 
 82  836
         _configurationPoints.add(descriptor);
 83   
     }
 84   
 
 85  201
     public List getConfigurationPoints()
 86   
     {
 87  201
         return _configurationPoints;
 88   
     }
 89   
 
 90  556
     public void addContribution(ContributionDescriptor descriptor)
 91   
     {
 92  556
         if (_contributions == null)
 93  157
             _contributions = new ArrayList();
 94   
             
 95  556
         _contributions.add(descriptor);
 96   
     }
 97   
 
 98  196
     public List getContributions()
 99   
     {
 100  196
         return _contributions;
 101   
     }
 102   
 
 103  1802
     public String getModuleId()
 104   
     {
 105  1802
         return _moduleId;
 106   
     }
 107   
 
 108  1
     public String getVersion()
 109   
     {
 110  1
         return _version;
 111   
     }
 112   
 
 113  216
     public void setModuleId(String string)
 114   
     {
 115  216
         _moduleId = string;
 116   
     }
 117   
 
 118  216
     public void setVersion(String string)
 119   
     {
 120  216
         _version = string;
 121   
     }
 122   
 
 123  194
     public ClassResolver getClassResolver()
 124   
     {
 125  194
         return _resolver;
 126   
     }
 127   
 
 128  216
     public void setClassResolver(ClassResolver resolver)
 129   
     {
 130  216
         _resolver = resolver;
 131   
     }
 132   
 
 133   
 }
 134