Clover coverage report - Code Coverage for hivemind release 1.0-rc-1
Coverage timestamp: Wed Aug 25 2004 13:06:02 EDT
file stats: LOC: 75   Methods: 5
NCLOC: 38   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
ContributionDescriptor.java 75% 90.9% 100% 90%
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.Collections;
 19   
 import java.util.List;
 20   
 
 21   
 import org.apache.hivemind.Element;
 22   
 import org.apache.hivemind.impl.BaseLocatable;
 23   
 import org.apache.hivemind.util.ToStringBuilder;
 24   
 
 25   
 /**
 26   
  * Descriptor for <contribution> element.
 27   
  *
 28   
  * @author Howard Lewis Ship
 29   
  */
 30   
 public final class ContributionDescriptor extends BaseLocatable
 31   
 {
 32   
     private String _configurationId;
 33   
 
 34   
     private List _elements;
 35   
 
 36   
     /**
 37   
      * Returns the extension id, which may be a local id (simple name)
 38   
      * or an extended id (including a module id prefix).
 39   
      */
 40  548
     public String getConfigurationId()
 41   
     {
 42  548
         return _configurationId;
 43   
     }
 44   
 
 45  556
     public void setConfigurationId(String string)
 46   
     {
 47  556
         _configurationId = string;
 48   
     }
 49   
 
 50  1
     public String toString()
 51   
     {
 52  1
         ToStringBuilder builder = new ToStringBuilder(this);
 53  1
         builder.append("configurationId", _configurationId);
 54   
 
 55  1
         return builder.toString();
 56   
     }
 57   
 
 58  2240
     public void addElement(Element element)
 59   
     {
 60  2240
         if (_elements == null)
 61  556
             _elements = new ArrayList();
 62   
 
 63  2240
         _elements.add(element);
 64   
     }
 65   
 
 66  546
     public List getElements()
 67   
     {
 68  546
         if (_elements == null)
 69  0
             return Collections.EMPTY_LIST;
 70   
 
 71  546
         return _elements;
 72   
     }
 73   
 
 74   
 }
 75