View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.0.1 on 2009-09-09 03:30:24,
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  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          if ( !(phase instanceof Phase) )
49          {
50              throw new ClassCastException( "Lifecycle.addPhases(phase) parameter must be instanceof " + Phase.class.getName() );
51          }
52          getPhases().add( phase );
53      } //-- 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          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          if ( this.phases == null )
74          {
75              this.phases = new java.util.ArrayList<Phase>();
76          }
77  
78          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          if ( !(phase instanceof Phase) )
89          {
90              throw new ClassCastException( "Lifecycle.removePhases(phase) parameter must be instanceof " + Phase.class.getName() );
91          }
92          getPhases().remove( phase );
93      } //-- 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         this.id = id;
104     } //-- 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         this.phases = phases;
114     } //-- void setPhases( java.util.List )
115 
116 
117 }