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: 88   Methods: 7
NCLOC: 46   Classes: 1
 
 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  700 public String getConfigurationId()
 43    {
 44  700 return _configurationId;
 45    }
 46   
 47  712 public void setConfigurationId(String string)
 48    {
 49  712 _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  3140 public void addElement(Element element)
 62    {
 63  3140 if (_elements == null)
 64  712 _elements = new ArrayList();
 65   
 66  3140 _elements.add(element);
 67    }
 68   
 69  697 public List getElements()
 70    {
 71  697 if (_elements == null)
 72  0 return Collections.EMPTY_LIST;
 73   
 74  697 return _elements;
 75    }
 76   
 77    /** @since 1.1 */
 78  701 public String getConditionalExpression()
 79    {
 80  701 return _conditionalExpression;
 81    }
 82   
 83    /** @since 1.1 */
 84  712 public void setConditionalExpression(String conditionalExpression)
 85    {
 86  712 _conditionalExpression = conditionalExpression;
 87    }
 88    }