Clover coverage report - Code Coverage for hivemind release 1.1-beta-1
Coverage timestamp: Thu Apr 28 2005 19:53:41 EDT
file stats: LOC: 61   Methods: 4
NCLOC: 31   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
ContributionImpl.java 75% 87.5% 100% 87.5%
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.impl;
 16   
 
 17   
 import java.util.ArrayList;
 18   
 import java.util.Collections;
 19   
 import java.util.List;
 20   
 
 21   
 import org.apache.hivemind.internal.Contribution;
 22   
 import org.apache.hivemind.internal.Module;
 23   
 
 24   
 /**
 25   
  * Implements the {@link org.apache.hivemind.internal.Contribution} interface, a wrapper
 26   
  * around objects that can provide values that plug into an extension point.
 27   
  * 
 28   
  * @author Howard Lewis Ship
 29   
  */
 30   
 public final class ContributionImpl implements Contribution
 31   
 {
 32   
     private Module _contributingModule;
 33   
 
 34   
     private List _elements;
 35   
 
 36  507
     public Module getContributingModule()
 37   
     {
 38  507
         return _contributingModule;
 39   
     }
 40   
 
 41  643
     public void setContributingModule(Module module)
 42   
     {
 43  643
         _contributingModule = module;
 44   
     }
 45   
 
 46  643
     public void addElements(List elements)
 47   
     {
 48  643
         if (_elements == null)
 49  643
             _elements = new ArrayList(elements);
 50   
         else
 51  0
             _elements.addAll(elements);
 52   
     }
 53   
 
 54  1151
     public List getElements()
 55   
     {
 56  1151
         if (_elements == null)
 57  1
             return Collections.EMPTY_LIST;
 58   
 
 59  1150
         return _elements;
 60   
     }
 61   
 }