Coverage Report - org.apache.maven.plugin.lifecycle.Lifecycle
 
Classes in this File Line Coverage Branch Coverage Complexity
Lifecycle
47 %
8/17
17 %
1/6
0
 
 1  
 /*
 2  
  =================== DO NOT EDIT THIS FILE ====================
 3  
  Generated by Modello 1.0.1 on 2009-09-09 03:10:21,
 4  
  any modifications will be overwritten.
 5  
  ==============================================================
 6  
  */
 7  
 
 8  
 package org.apache.maven.plugin.lifecycle;
 9  
 
 10  
 /**
 11  
  * 
 12  
  *         A custom lifecycle mapping definition.
 13  
  *       
 14  
  * 
 15  
  * @version $Revision$ $Date$
 16  
  */
 17  1
 public class Lifecycle
 18  
     implements java.io.Serializable
 19  
 {
 20  
 
 21  
       //--------------------------/
 22  
      //- Class/Member Variables -/
 23  
     //--------------------------/
 24  
 
 25  
     /**
 26  
      * The ID of this lifecycle, for identification in the mojo
 27  
      * descriptor.
 28  
      */
 29  
     private String id;
 30  
 
 31  
     /**
 32  
      * Field phases.
 33  
      */
 34  
     private java.util.List<Phase> phases;
 35  
 
 36  
 
 37  
       //-----------/
 38  
      //- Methods -/
 39  
     //-----------/
 40  
 
 41  
     /**
 42  
      * Method addPhase.
 43  
      * 
 44  
      * @param phase
 45  
      */
 46  
     public void addPhase( Phase phase )
 47  
     {
 48  0
         if ( !(phase instanceof Phase) )
 49  
         {
 50  0
             throw new ClassCastException( "Lifecycle.addPhases(phase) parameter must be instanceof " + Phase.class.getName() );
 51  
         }
 52  0
         getPhases().add( phase );
 53  0
     } //-- void addPhase( Phase )
 54  
 
 55  
     /**
 56  
      * Get the ID of this lifecycle, for identification in the mojo
 57  
      * descriptor.
 58  
      * 
 59  
      * @return String
 60  
      */
 61  
     public String getId()
 62  
     {
 63  1
         return this.id;
 64  
     } //-- String getId()
 65  
 
 66  
     /**
 67  
      * Method getPhases.
 68  
      * 
 69  
      * @return List
 70  
      */
 71  
     public java.util.List<Phase> getPhases()
 72  
     {
 73  2
         if ( this.phases == null )
 74  
         {
 75  0
             this.phases = new java.util.ArrayList<Phase>();
 76  
         }
 77  
 
 78  2
         return this.phases;
 79  
     } //-- java.util.List<Phase> getPhases()
 80  
 
 81  
     /**
 82  
      * Method removePhase.
 83  
      * 
 84  
      * @param phase
 85  
      */
 86  
     public void removePhase( Phase phase )
 87  
     {
 88  0
         if ( !(phase instanceof Phase) )
 89  
         {
 90  0
             throw new ClassCastException( "Lifecycle.removePhases(phase) parameter must be instanceof " + Phase.class.getName() );
 91  
         }
 92  0
         getPhases().remove( phase );
 93  0
     } //-- void removePhase( Phase )
 94  
 
 95  
     /**
 96  
      * Set the ID of this lifecycle, for identification in the mojo
 97  
      * descriptor.
 98  
      * 
 99  
      * @param id
 100  
      */
 101  
     public void setId( String id )
 102  
     {
 103  1
         this.id = id;
 104  1
     } //-- void setId( String )
 105  
 
 106  
     /**
 107  
      * Set the phase mappings for this lifecycle.
 108  
      * 
 109  
      * @param phases
 110  
      */
 111  
     public void setPhases( java.util.List<Phase> phases )
 112  
     {
 113  1
         this.phases = phases;
 114  1
     } //-- void setPhases( java.util.List )
 115  
 
 116  
 
 117  
 }