View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.4.1 on 2012-01-20 18:09:18,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.apache.maven.model;
9   
10  /**
11   * 
12   *         
13   *         The <code>&lt;exclusion&gt;</code> element contains
14   * informations required to exclude
15   *         an artifact to the project.
16   *         
17   *       
18   * 
19   * @version $Revision$ $Date$
20   */
21  @SuppressWarnings( "all" )
22  public class Exclusion
23      implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
24  {
25  
26        //--------------------------/
27       //- Class/Member Variables -/
28      //--------------------------/
29  
30      /**
31       * The artifact ID of the project to exclude.
32       */
33      private String artifactId;
34  
35      /**
36       * The group ID of the project to exclude.
37       */
38      private String groupId;
39  
40      /**
41       * Field locations.
42       */
43      private java.util.Map<Object, InputLocation> locations;
44  
45  
46        //-----------/
47       //- Methods -/
48      //-----------/
49  
50      /**
51       * Method clone.
52       * 
53       * @return Exclusion
54       */
55      public Exclusion clone()
56      {
57          try
58          {
59              Exclusion copy = (Exclusion) super.clone();
60  
61              if ( copy.locations != null )
62              {
63                  copy.locations = new java.util.LinkedHashMap( copy.locations );
64              }
65  
66              return copy;
67          }
68          catch ( java.lang.Exception ex )
69          {
70              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
71                  + " does not support clone()" ).initCause( ex );
72          }
73      } //-- Exclusion clone()
74  
75      /**
76       * Get the artifact ID of the project to exclude.
77       * 
78       * @return String
79       */
80      public String getArtifactId()
81      {
82          return this.artifactId;
83      } //-- String getArtifactId()
84  
85      /**
86       * Get the group ID of the project to exclude.
87       * 
88       * @return String
89       */
90      public String getGroupId()
91      {
92          return this.groupId;
93      } //-- String getGroupId()
94  
95      /**
96       * 
97       * 
98       * @param key
99       * @return InputLocation
100      */
101     public InputLocation getLocation( Object key )
102     {
103         return ( locations != null ) ? locations.get( key ) : null;
104     } //-- InputLocation getLocation( Object )
105 
106     /**
107      * Set the artifact ID of the project to exclude.
108      * 
109      * @param artifactId
110      */
111     public void setArtifactId( String artifactId )
112     {
113         this.artifactId = artifactId;
114     } //-- void setArtifactId( String )
115 
116     /**
117      * Set the group ID of the project to exclude.
118      * 
119      * @param groupId
120      */
121     public void setGroupId( String groupId )
122     {
123         this.groupId = groupId;
124     } //-- void setGroupId( String )
125 
126     /**
127      * 
128      * 
129      * @param key
130      * @param location
131      */
132     public void setLocation( Object key, InputLocation location )
133     {
134         if ( location != null )
135         {
136             if ( this.locations == null )
137             {
138                 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
139             }
140             this.locations.put( key, location );
141         }
142     } //-- void setLocation( Object, InputLocation )
143 
144 }