Coverage Report - org.codehaus.plexus.component.discovery.ComponentDiscoveryEvent
 
Classes in this File Line Coverage Branch Coverage Complexity
ComponentDiscoveryEvent
44 %
4/9
N/A
1
 
 1  
 package org.codehaus.plexus.component.discovery;
 2  
 
 3  
 /*
 4  
  * Copyright 2001-2006 Codehaus Foundation.
 5  
  *
 6  
  * Licensed under the Apache License, Version 2.0 (the "License");
 7  
  * you may not use this file except in compliance with the License.
 8  
  * You may obtain a copy of the License at
 9  
  *
 10  
  *      http://www.apache.org/licenses/LICENSE-2.0
 11  
  *
 12  
  * Unless required by applicable law or agreed to in writing, software
 13  
  * distributed under the License is distributed on an "AS IS" BASIS,
 14  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 15  
  * See the License for the specific language governing permissions and
 16  
  * limitations under the License.
 17  
  */
 18  
 
 19  
 import org.codehaus.plexus.component.repository.ComponentSetDescriptor;
 20  
 
 21  
 /**
 22  
  * Signals to a ComponentDiscoveryListener that an event has taken place
 23  
  * involving a set of components. It is up to the Listener to decide what
 24  
  * to do with that information.
 25  
  */
 26  
 public class ComponentDiscoveryEvent
 27  
 {
 28  
     private ComponentSetDescriptor componentSetDescriptor;
 29  
 
 30  
     private Object data;
 31  
 
 32  
     /**
 33  
      * Constructs a <code>ComponentDiscoveryEvent</code> with a set of
 34  
      * ComponentDescriptors.
 35  
      * @param componentSetDescriptor a set of ComponentDescriptors
 36  
      */
 37  
     public ComponentDiscoveryEvent( ComponentSetDescriptor componentSetDescriptor )
 38  0
     {
 39  0
         this.componentSetDescriptor = componentSetDescriptor;
 40  0
     }
 41  
 
 42  
     public ComponentDiscoveryEvent( ComponentSetDescriptor componentSetDescriptor, Object data )
 43  515
     {
 44  515
         this.componentSetDescriptor = componentSetDescriptor;
 45  516
         this.data = data;
 46  515
     }
 47  
 
 48  
     /**
 49  
      * Returns this event's set of ComponentDescriptors.
 50  
      * @return this event's set of ComponentDescriptors
 51  
      */
 52  
     public ComponentSetDescriptor getComponentSetDescriptor()
 53  
     {
 54  0
         return componentSetDescriptor;
 55  
     }
 56  
 
 57  
     public Object getData()
 58  
     {
 59  0
         return data;
 60  
     }
 61  
 }