1
2
3
4
5
6 package org.apache.maven.model;
7
8
9
10
11
12
13
14
15
16
17
18 @SuppressWarnings( "all" )
19 public class Activation
20 implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
21 {
22
23
24
25
26
27
28
29
30
31
32
33
34 private boolean activeByDefault = false;
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50 private String jdk;
51
52
53
54
55
56
57 private ActivationOS os;
58
59
60
61
62
63
64 private ActivationProperty property;
65
66
67
68
69
70 private ActivationFile file;
71
72
73
74
75 private java.util.Map<Object, InputLocation> locations;
76
77
78
79
80 private InputLocation location;
81
82
83
84
85 private InputLocation activeByDefaultLocation;
86
87
88
89
90 private InputLocation jdkLocation;
91
92
93
94
95 private InputLocation osLocation;
96
97
98
99
100 private InputLocation propertyLocation;
101
102
103
104
105 private InputLocation fileLocation;
106
107
108
109
110
111
112
113
114
115
116
117 public Activation clone()
118 {
119 try
120 {
121 Activation copy = (Activation) super.clone();
122
123 if ( this.os != null )
124 {
125 copy.os = (ActivationOS) this.os.clone();
126 }
127
128 if ( this.property != null )
129 {
130 copy.property = (ActivationProperty) this.property.clone();
131 }
132
133 if ( this.file != null )
134 {
135 copy.file = (ActivationFile) this.file.clone();
136 }
137
138 if ( copy.locations != null )
139 {
140 copy.locations = new java.util.LinkedHashMap( copy.locations );
141 }
142
143 return copy;
144 }
145 catch ( java.lang.Exception ex )
146 {
147 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
148 + " does not support clone()" ).initCause( ex );
149 }
150 }
151
152
153
154
155
156
157
158 public ActivationFile getFile()
159 {
160 return this.file;
161 }
162
163
164
165
166
167
168
169
170
171
172
173
174
175 public String getJdk()
176 {
177 return this.jdk;
178 }
179
180
181
182
183
184
185
186 public InputLocation getLocation( Object key )
187 {
188 if ( key instanceof String )
189 {
190 switch ( ( String ) key )
191 {
192 case "" :
193 {
194 return this.location;
195 }
196 case "activeByDefault" :
197 {
198 return activeByDefaultLocation;
199 }
200 case "jdk" :
201 {
202 return jdkLocation;
203 }
204 case "os" :
205 {
206 return osLocation;
207 }
208 case "property" :
209 {
210 return propertyLocation;
211 }
212 case "file" :
213 {
214 return fileLocation;
215 }
216 default :
217 {
218 return getOtherLocation( key );
219 }
220 }
221 }
222 else
223 {
224 return getOtherLocation( key );
225 }
226 }
227
228
229
230
231
232
233
234
235 public ActivationOS getOs()
236 {
237 return this.os;
238 }
239
240
241
242
243
244
245
246 public void setLocation( Object key, InputLocation location )
247 {
248 if ( key instanceof String )
249 {
250 switch ( ( String ) key )
251 {
252 case "" :
253 {
254 this.location = location;
255 return;
256 }
257 case "activeByDefault" :
258 {
259 activeByDefaultLocation = location;
260 return;
261 }
262 case "jdk" :
263 {
264 jdkLocation = location;
265 return;
266 }
267 case "os" :
268 {
269 osLocation = location;
270 return;
271 }
272 case "property" :
273 {
274 propertyLocation = location;
275 return;
276 }
277 case "file" :
278 {
279 fileLocation = location;
280 return;
281 }
282 default :
283 {
284 setOtherLocation( key, location );
285 return;
286 }
287 }
288 }
289 else
290 {
291 setOtherLocation( key, location );
292 }
293 }
294
295
296
297
298
299
300
301 public void setOtherLocation( Object key, InputLocation location )
302 {
303 if ( location != null )
304 {
305 if ( this.locations == null )
306 {
307 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
308 }
309 this.locations.put( key, location );
310 }
311 }
312
313
314
315
316
317
318
319 private InputLocation getOtherLocation( Object key )
320 {
321 return ( locations != null ) ? locations.get( key ) : null;
322 }
323
324
325
326
327
328
329
330
331 public ActivationProperty getProperty()
332 {
333 return this.property;
334 }
335
336
337
338
339
340
341
342
343
344
345 public boolean isActiveByDefault()
346 {
347 return this.activeByDefault;
348 }
349
350
351
352
353
354
355
356
357
358
359 public void setActiveByDefault( boolean activeByDefault )
360 {
361 this.activeByDefault = activeByDefault;
362 }
363
364
365
366
367
368
369
370 public void setFile( ActivationFile file )
371 {
372 this.file = file;
373 }
374
375
376
377
378
379
380
381
382
383
384
385
386
387 public void setJdk( String jdk )
388 {
389 this.jdk = jdk;
390 }
391
392
393
394
395
396
397
398
399 public void setOs( ActivationOS os )
400 {
401 this.os = os;
402 }
403
404
405
406
407
408
409
410
411 public void setProperty( ActivationProperty property )
412 {
413 this.property = property;
414 }
415
416 }