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