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