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