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