Coverage Report - org.apache.maven.plugin.lifecycle.LifecycleConfiguration
 
Classes in this File Line Coverage Branch Coverage Complexity
LifecycleConfiguration
0%
0/18
0%
0/10
1.833
 
 1  
 /*
 2  
  * $Id$
 3  
  */
 4  
 
 5  
 package org.apache.maven.plugin.lifecycle;
 6  
 
 7  
   //---------------------------------/
 8  
  //- Imported classes and packages -/
 9  
 //---------------------------------/
 10  
 
 11  
 import java.util.Date;
 12  
 
 13  
 /**
 14  
  * Root element of the lifecycle.xml file.
 15  
  * 
 16  
  * @version $Revision$ $Date$
 17  
  */
 18  0
 public class LifecycleConfiguration implements java.io.Serializable {
 19  
 
 20  
 
 21  
       //--------------------------/
 22  
      //- Class/Member Variables -/
 23  
     //--------------------------/
 24  
 
 25  
     /**
 26  
      * Field lifecycles.
 27  
      */
 28  
     private java.util.List lifecycles;
 29  
 
 30  
 
 31  
       //-----------/
 32  
      //- Methods -/
 33  
     //-----------/
 34  
 
 35  
     /**
 36  
      * Method addLifecycle.
 37  
      * 
 38  
      * @param lifecycle
 39  
      */
 40  
     public void addLifecycle( Lifecycle lifecycle )
 41  
     {
 42  0
         if ( !(lifecycle instanceof Lifecycle) )
 43  
         {
 44  0
             throw new ClassCastException( "LifecycleConfiguration.addLifecycles(lifecycle) parameter must be instanceof " + Lifecycle.class.getName() );
 45  
         }
 46  0
         getLifecycles().add( lifecycle );
 47  0
     } //-- void addLifecycle( Lifecycle ) 
 48  
 
 49  
     /**
 50  
      * Method getLifecycles.
 51  
      * 
 52  
      * @return java.util.List
 53  
      */
 54  
     public java.util.List getLifecycles()
 55  
     {
 56  0
         if ( this.lifecycles == null )
 57  
         {
 58  0
             this.lifecycles = new java.util.ArrayList();
 59  
         }
 60  
     
 61  0
         return this.lifecycles;
 62  
     } //-- java.util.List getLifecycles() 
 63  
 
 64  
     /**
 65  
      * Method removeLifecycle.
 66  
      * 
 67  
      * @param lifecycle
 68  
      */
 69  
     public void removeLifecycle( Lifecycle lifecycle )
 70  
     {
 71  0
         if ( !(lifecycle instanceof Lifecycle) )
 72  
         {
 73  0
             throw new ClassCastException( "LifecycleConfiguration.removeLifecycles(lifecycle) parameter must be instanceof " + Lifecycle.class.getName() );
 74  
         }
 75  0
         getLifecycles().remove( lifecycle );
 76  0
     } //-- void removeLifecycle( Lifecycle ) 
 77  
 
 78  
     /**
 79  
      * Set the lifecycles field.
 80  
      * 
 81  
      * @param lifecycles
 82  
      */
 83  
     public void setLifecycles( java.util.List lifecycles )
 84  
     {
 85  0
         this.lifecycles = lifecycles;
 86  0
     } //-- void setLifecycles( java.util.List ) 
 87  
 
 88  
 
 89  0
     private String modelEncoding = "UTF-8";
 90  
 
 91  
     /**
 92  
      * Set an encoding used for reading/writing the model.
 93  
      *
 94  
      * @param modelEncoding the encoding used when reading/writing the model.
 95  
      */
 96  
     public void setModelEncoding( String modelEncoding )
 97  
     {
 98  0
         this.modelEncoding = modelEncoding;
 99  0
     }
 100  
 
 101  
     /**
 102  
      * @return the current encoding used when reading/writing this model.
 103  
      */
 104  
     public String getModelEncoding()
 105  
     {
 106  0
         return modelEncoding;
 107  
     }
 108  
 }