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
34
35
36
37 @SuppressWarnings( "all" )
38 public class Exclusion
39 implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
40 {
41
42
43
44
45
46
47
48
49 private String groupId;
50
51
52
53
54 private String artifactId;
55
56
57
58
59 private java.util.Map<Object, InputLocation> locations;
60
61
62
63
64 private InputLocation location;
65
66
67
68
69 private InputLocation groupIdLocation;
70
71
72
73
74 private InputLocation artifactIdLocation;
75
76
77
78
79
80
81
82
83
84
85
86 public Exclusion clone()
87 {
88 try
89 {
90 Exclusion copy = (Exclusion) super.clone();
91
92 if ( copy.locations != null )
93 {
94 copy.locations = new java.util.LinkedHashMap( copy.locations );
95 }
96
97 return copy;
98 }
99 catch ( java.lang.Exception ex )
100 {
101 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
102 + " does not support clone()" ).initCause( ex );
103 }
104 }
105
106
107
108
109
110
111 public String getArtifactId()
112 {
113 return this.artifactId;
114 }
115
116
117
118
119
120
121 public String getGroupId()
122 {
123 return this.groupId;
124 }
125
126
127
128
129
130
131
132 public InputLocation getLocation( Object key )
133 {
134 if ( key instanceof String )
135 {
136 switch ( ( String ) key )
137 {
138 case "" :
139 {
140 return this.location;
141 }
142 case "groupId" :
143 {
144 return groupIdLocation;
145 }
146 case "artifactId" :
147 {
148 return artifactIdLocation;
149 }
150 default :
151 {
152 return getOtherLocation( key );
153 }
154 }
155 }
156 else
157 {
158 return getOtherLocation( key );
159 }
160 }
161
162
163
164
165
166
167
168 public void setLocation( Object key, InputLocation location )
169 {
170 if ( key instanceof String )
171 {
172 switch ( ( String ) key )
173 {
174 case "" :
175 {
176 this.location = location;
177 return;
178 }
179 case "groupId" :
180 {
181 groupIdLocation = location;
182 return;
183 }
184 case "artifactId" :
185 {
186 artifactIdLocation = location;
187 return;
188 }
189 default :
190 {
191 setOtherLocation( key, location );
192 return;
193 }
194 }
195 }
196 else
197 {
198 setOtherLocation( key, location );
199 }
200 }
201
202
203
204
205
206
207
208 public void setOtherLocation( Object key, InputLocation location )
209 {
210 if ( location != null )
211 {
212 if ( this.locations == null )
213 {
214 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
215 }
216 this.locations.put( key, location );
217 }
218 }
219
220
221
222
223
224
225
226 private InputLocation getOtherLocation( Object key )
227 {
228 return ( locations != null ) ? locations.get( key ) : null;
229 }
230
231
232
233
234
235
236 public void setArtifactId( String artifactId )
237 {
238 this.artifactId = artifactId;
239 }
240
241
242
243
244
245
246 public void setGroupId( String groupId )
247 {
248 this.groupId = groupId;
249 }
250
251 }