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   * A phase mapping definition.
12   * 
13   * @version $Revision$ $Date$
14   */
15  public class Phase
16      implements java.io.Serializable
17  {
18  
19        //--------------------------/
20       //- Class/Member Variables -/
21      //--------------------------/
22  
23      /**
24       * The ID of this phase, eg <code>generate-sources</code>.
25       */
26      private String id;
27  
28      /**
29       * Field executions.
30       */
31      private java.util.List<Execution> executions;
32  
33      /**
34       * Configuration to pass to all goals run in this phase.
35       */
36      private Object configuration;
37  
38  
39        //-----------/
40       //- Methods -/
41      //-----------/
42  
43      /**
44       * Method addExecution.
45       * 
46       * @param execution
47       */
48      public void addExecution( Execution execution )
49      {
50          if ( !(execution instanceof Execution) )
51          {
52              throw new ClassCastException( "Phase.addExecutions(execution) parameter must be instanceof " + Execution.class.getName() );
53          }
54          getExecutions().add( execution );
55      } //-- void addExecution( Execution )
56  
57      /**
58       * Get configuration to pass to all goals run in this phase.
59       * 
60       * @return Object
61       */
62      public Object getConfiguration()
63      {
64          return this.configuration;
65      } //-- Object getConfiguration()
66  
67      /**
68       * Method getExecutions.
69       * 
70       * @return List
71       */
72      public java.util.List<Execution> getExecutions()
73      {
74          if ( this.executions == null )
75          {
76              this.executions = new java.util.ArrayList<Execution>();
77          }
78  
79          return this.executions;
80      } //-- java.util.List<Execution> getExecutions()
81  
82      /**
83       * Get the ID of this phase, eg <code>generate-sources</code>.
84       * 
85       * @return String
86       */
87      public String getId()
88      {
89          return this.id;
90      } //-- String getId()
91  
92      /**
93       * Method removeExecution.
94       * 
95       * @param execution
96       */
97      public void removeExecution( Execution execution )
98      {
99          if ( !(execution instanceof Execution) )
100         {
101             throw new ClassCastException( "Phase.removeExecutions(execution) parameter must be instanceof " + Execution.class.getName() );
102         }
103         getExecutions().remove( execution );
104     } //-- void removeExecution( Execution )
105 
106     /**
107      * Set configuration to pass to all goals run in this phase.
108      * 
109      * @param configuration
110      */
111     public void setConfiguration( Object configuration )
112     {
113         this.configuration = configuration;
114     } //-- void setConfiguration( Object )
115 
116     /**
117      * Set the goals to execute within the phase.
118      * 
119      * @param executions
120      */
121     public void setExecutions( java.util.List<Execution> executions )
122     {
123         this.executions = executions;
124     } //-- void setExecutions( java.util.List )
125 
126     /**
127      * Set the ID of this phase, eg <code>generate-sources</code>.
128      * 
129      * @param id
130      */
131     public void setId( String id )
132     {
133         this.id = id;
134     } //-- void setId( String )
135 
136 
137 }