View Javadoc

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