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