1
2
3
4
5
6
7
8 package org.apache.maven.plugin.lifecycle;
9
10
11
12
13
14
15
16
17 public class Lifecycle
18 implements java.io.Serializable
19 {
20
21
22
23
24
25
26
27
28
29 private String id;
30
31
32
33
34 private java.util.List<Phase> phases;
35
36
37
38
39
40
41
42
43
44
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 }
54
55
56
57
58
59
60
61 public String getId()
62 {
63 return this.id;
64 }
65
66
67
68
69
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 }
80
81
82
83
84
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 }
94
95
96
97
98
99
100
101 public void setId( String id )
102 {
103 this.id = id;
104 }
105
106
107
108
109
110
111 public void setPhases( java.util.List<Phase> phases )
112 {
113 this.phases = phases;
114 }
115
116
117 }