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 @SuppressWarnings( "all" )
34 public class ActivationOS
35 implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
36 {
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 private String name;
53
54
55
56
57
58
59
60
61
62
63 private String family;
64
65
66
67
68
69
70 private String arch;
71
72
73
74
75
76
77 private String version;
78
79
80
81
82 private java.util.Map<Object, InputLocation> locations;
83
84
85
86
87 private InputLocation location;
88
89
90
91
92 private InputLocation nameLocation;
93
94
95
96
97 private InputLocation familyLocation;
98
99
100
101
102 private InputLocation archLocation;
103
104
105
106
107 private InputLocation versionLocation;
108
109
110
111
112
113
114
115
116
117
118
119 public ActivationOS clone()
120 {
121 try
122 {
123 ActivationOS copy = (ActivationOS) super.clone();
124
125 if ( copy.locations != null )
126 {
127 copy.locations = new java.util.LinkedHashMap( copy.locations );
128 }
129
130 return copy;
131 }
132 catch ( java.lang.Exception ex )
133 {
134 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
135 + " does not support clone()" ).initCause( ex );
136 }
137 }
138
139
140
141
142
143
144
145
146 public String getArch()
147 {
148 return this.arch;
149 }
150
151
152
153
154
155
156
157
158 public String getFamily()
159 {
160 return this.family;
161 }
162
163
164
165
166
167
168
169 public InputLocation getLocation( Object key )
170 {
171 if ( key instanceof String )
172 {
173 switch ( ( String ) key )
174 {
175 case "" :
176 {
177 return this.location;
178 }
179 case "name" :
180 {
181 return nameLocation;
182 }
183 case "family" :
184 {
185 return familyLocation;
186 }
187 case "arch" :
188 {
189 return archLocation;
190 }
191 case "version" :
192 {
193 return versionLocation;
194 }
195 default :
196 {
197 return getOtherLocation( key );
198 }
199 }
200 }
201 else
202 {
203 return getOtherLocation( key );
204 }
205 }
206
207
208
209
210
211
212
213
214
215 public String getName()
216 {
217 return this.name;
218 }
219
220
221
222
223
224
225
226 public void setLocation( Object key, InputLocation location )
227 {
228 if ( key instanceof String )
229 {
230 switch ( ( String ) key )
231 {
232 case "" :
233 {
234 this.location = location;
235 return;
236 }
237 case "name" :
238 {
239 nameLocation = location;
240 return;
241 }
242 case "family" :
243 {
244 familyLocation = location;
245 return;
246 }
247 case "arch" :
248 {
249 archLocation = location;
250 return;
251 }
252 case "version" :
253 {
254 versionLocation = location;
255 return;
256 }
257 default :
258 {
259 setOtherLocation( key, location );
260 return;
261 }
262 }
263 }
264 else
265 {
266 setOtherLocation( key, location );
267 }
268 }
269
270
271
272
273
274
275
276 public void setOtherLocation( Object key, InputLocation location )
277 {
278 if ( location != null )
279 {
280 if ( this.locations == null )
281 {
282 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
283 }
284 this.locations.put( key, location );
285 }
286 }
287
288
289
290
291
292
293
294 private InputLocation getOtherLocation( Object key )
295 {
296 return ( locations != null ) ? locations.get( key ) : null;
297 }
298
299
300
301
302
303
304
305
306 public String getVersion()
307 {
308 return this.version;
309 }
310
311
312
313
314
315
316
317
318 public void setArch( String arch )
319 {
320 this.arch = arch;
321 }
322
323
324
325
326
327
328
329
330 public void setFamily( String family )
331 {
332 this.family = family;
333 }
334
335
336
337
338
339
340
341
342
343 public void setName( String name )
344 {
345 this.name = name;
346 }
347
348
349
350
351
352
353
354
355 public void setVersion( String version )
356 {
357 this.version = version;
358 }
359
360 }