1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 package org.apache.maven.model;
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40 @SuppressWarnings( "all" )
41 public class ActivationFile
42 implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
43 {
44
45
46
47
48
49
50
51
52
53 private String missing;
54
55
56
57
58 private String exists;
59
60
61
62
63 private java.util.Map<Object, InputLocation> locations;
64
65
66
67
68 private InputLocation location;
69
70
71
72
73 private InputLocation missingLocation;
74
75
76
77
78 private InputLocation existsLocation;
79
80
81
82
83
84
85
86
87
88
89
90 public ActivationFile clone()
91 {
92 try
93 {
94 ActivationFile copy = (ActivationFile) super.clone();
95
96 if ( copy.locations != null )
97 {
98 copy.locations = new java.util.LinkedHashMap( copy.locations );
99 }
100
101 return copy;
102 }
103 catch ( java.lang.Exception ex )
104 {
105 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
106 + " does not support clone()" ).initCause( ex );
107 }
108 }
109
110
111
112
113
114
115
116 public String getExists()
117 {
118 return this.exists;
119 }
120
121
122
123
124
125
126
127 public InputLocation getLocation( Object key )
128 {
129 if ( key instanceof String )
130 {
131 switch ( ( String ) key )
132 {
133 case "" :
134 {
135 return this.location;
136 }
137 case "missing" :
138 {
139 return missingLocation;
140 }
141 case "exists" :
142 {
143 return existsLocation;
144 }
145 default :
146 {
147 return getOtherLocation( key );
148 }
149 }
150 }
151 else
152 {
153 return getOtherLocation( key );
154 }
155 }
156
157
158
159
160
161
162
163
164 public String getMissing()
165 {
166 return this.missing;
167 }
168
169
170
171
172
173
174
175 public void setLocation( Object key, InputLocation location )
176 {
177 if ( key instanceof String )
178 {
179 switch ( ( String ) key )
180 {
181 case "" :
182 {
183 this.location = location;
184 return;
185 }
186 case "missing" :
187 {
188 missingLocation = location;
189 return;
190 }
191 case "exists" :
192 {
193 existsLocation = location;
194 return;
195 }
196 default :
197 {
198 setOtherLocation( key, location );
199 return;
200 }
201 }
202 }
203 else
204 {
205 setOtherLocation( key, location );
206 }
207 }
208
209
210
211
212
213
214
215 public void setOtherLocation( Object key, InputLocation location )
216 {
217 if ( location != null )
218 {
219 if ( this.locations == null )
220 {
221 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
222 }
223 this.locations.put( key, location );
224 }
225 }
226
227
228
229
230
231
232
233 private InputLocation getOtherLocation( Object key )
234 {
235 return ( locations != null ) ? locations.get( key ) : null;
236 }
237
238
239
240
241
242
243
244 public void setExists( String exists )
245 {
246 this.exists = exists;
247 }
248
249
250
251
252
253
254
255
256 public void setMissing( String missing )
257 {
258 this.missing = missing;
259 }
260
261 }