Clover coverage report - Code Coverage for hivemind release 1.1-alpha-2
Coverage timestamp: Wed Feb 23 2005 09:59:04 EST
file stats: LOC: 88   Methods: 7
NCLOC: 46   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% 92.9% 100% 92%
coverage 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 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.util.ToStringBuilder;
 23   
 
 24   
 /**
 25   
  * Descriptor for <contribution> element.
 26   
  * 
 27   
  * @author Howard Lewis Ship
 28   
  */
 29   
 public final class ContributionDescriptor extends BaseAnnotationHolder
 30   
 {
 31   
     private String _configurationId;
 32   
 
 33   
     private List _elements;
 34   
 
 35   
     /** @since 1.1 */
 36   
     private String _conditionalExpression;
 37   
 
 38   
     /**
 39   
      * Returns the extension id, which may be a local id (simple name) or an extended id (including
 40   
      * a module id prefix).
 41   
      */
 42  629
     public String getConfigurationId()
 43   
     {
 44  629
         return _configurationId;
 45   
     }
 46   
 
 47  641
     public void setConfigurationId(String string)
 48   
     {
 49  641
         _configurationId = string;
 50   
     }
 51   
 
 52  1
     public String toString()
 53   
     {
 54  1
         ToStringBuilder builder = new ToStringBuilder(this);
 55  1
         builder.append("configurationId", _configurationId);
 56  1
         builder.append("conditionalExpression", _conditionalExpression);
 57   
 
 58  1
         return builder.toString();
 59   
     }
 60   
 
 61  2695
     public void addElement(Element element)
 62   
     {
 63  2695
         if (_elements == null)
 64  641
             _elements = new ArrayList();
 65   
 
 66  2695
         _elements.add(element);
 67   
     }
 68   
 
 69  626
     public List getElements()
 70   
     {
 71  626
         if (_elements == null)
 72  0
             return Collections.EMPTY_LIST;
 73   
 
 74  626
         return _elements;
 75   
     }
 76   
 
 77   
     /** @since 1.1 */
 78  630
     public String getConditionalExpression()
 79   
     {
 80  630
         return _conditionalExpression;
 81   
     }
 82   
 
 83   
     /** @since 1.1 */
 84  641
     public void setConditionalExpression(String conditionalExpression)
 85   
     {
 86  641
         _conditionalExpression = conditionalExpression;
 87   
     }
 88   
 }