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