View Javadoc
1   /*
2    Licensed to the Apache Software Foundation (ASF) under one
3    or more contributor license agreements.  See the NOTICE file
4    distributed with this work for additional information
5    regarding copyright ownership.  The ASF licenses this file
6    to you under the Apache License, Version 2.0 (the
7    "License"); you may not use this file except in compliance
8    with the License.  You may obtain a copy of the License at
9    
10       http://www.apache.org/licenses/LICENSE-2.0
11   
12   Unless required by applicable law or agreed to in writing,
13   software distributed under the License is distributed on an
14   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   KIND, either express or implied.  See the License for the
16   specific language governing permissions and limitations
17   under the License.
18   =================== DO NOT EDIT THIS FILE ====================
19   Generated by Modello 2.5.1,
20   any modifications will be overwritten.
21   ==============================================================
22   */
23  
24  package org.apache.maven.plugins.javadoc.options;
25  
26  /**
27   * An artifact object used by Javadoc path options like -docletpath
28   * or -tagletpath.
29   * 
30   * @version $Revision$ $Date$
31   */
32  @SuppressWarnings( "all" )
33  public class JavadocPathArtifact
34      implements java.io.Serializable
35  {
36  
37        //--------------------------/
38       //- Class/Member Variables -/
39      //--------------------------/
40  
41      /**
42       * The id of the group of the artifact.
43       */
44      private String groupId;
45  
46      /**
47       * The id of the artifact.
48       */
49      private String artifactId;
50  
51      /**
52       * The version of the artifact.
53       */
54      private String version;
55  
56      /**
57       * The classifier of the artifact.
58       */
59      private String classifier;
60  
61  
62        //-----------/
63       //- Methods -/
64      //-----------/
65  
66      /**
67       * Method equals.
68       * 
69       * @param other a other object.
70       * @return boolean
71       */
72      public boolean equals( Object other )
73      {
74          if ( this == other )
75          {
76              return true;
77          }
78  
79          if ( !( other instanceof JavadocPathArtifact ) )
80          {
81              return false;
82          }
83  
84          JavadocPathArtifact that = (JavadocPathArtifact) other;
85          boolean result = true;
86  
87          result = result && ( getGroupId() == null ? that.getGroupId() == null : getGroupId().equals( that.getGroupId() ) );
88          result = result && ( getArtifactId() == null ? that.getArtifactId() == null : getArtifactId().equals( that.getArtifactId() ) );
89          result = result && ( getVersion() == null ? that.getVersion() == null : getVersion().equals( that.getVersion() ) );
90          result = result && ( getClassifier() == null ? that.getClassifier() == null : getClassifier().equals( that.getClassifier() ) );
91  
92          return result;
93      } //-- boolean equals( Object )
94  
95      /**
96       * Get the id of the artifact.
97       * 
98       * @return String
99       */
100     public String getArtifactId()
101     {
102         return this.artifactId;
103     } //-- String getArtifactId()
104 
105     /**
106      * Get the classifier of the artifact.
107      * 
108      * @return String
109      */
110     public String getClassifier()
111     {
112         return this.classifier;
113     } //-- String getClassifier()
114 
115     /**
116      * Get the id of the group of the artifact.
117      * 
118      * @return String
119      */
120     public String getGroupId()
121     {
122         return this.groupId;
123     } //-- String getGroupId()
124 
125     /**
126      * Get the version of the artifact.
127      * 
128      * @return String
129      */
130     public String getVersion()
131     {
132         return this.version;
133     } //-- String getVersion()
134 
135     /**
136      * Method hashCode.
137      * 
138      * @return int
139      */
140     public int hashCode()
141     {
142         int result = 17;
143 
144         result = 37 * result + ( groupId != null ? groupId.hashCode() : 0 );
145         result = 37 * result + ( artifactId != null ? artifactId.hashCode() : 0 );
146         result = 37 * result + ( version != null ? version.hashCode() : 0 );
147         result = 37 * result + ( classifier != null ? classifier.hashCode() : 0 );
148 
149         return result;
150     } //-- int hashCode()
151 
152     /**
153      * Set the id of the artifact.
154      * 
155      * @param artifactId a artifactId object.
156      */
157     public void setArtifactId( String artifactId )
158     {
159         this.artifactId = artifactId;
160     } //-- void setArtifactId( String )
161 
162     /**
163      * Set the classifier of the artifact.
164      * 
165      * @param classifier a classifier object.
166      */
167     public void setClassifier( String classifier )
168     {
169         this.classifier = classifier;
170     } //-- void setClassifier( String )
171 
172     /**
173      * Set the id of the group of the artifact.
174      * 
175      * @param groupId a groupId object.
176      */
177     public void setGroupId( String groupId )
178     {
179         this.groupId = groupId;
180     } //-- void setGroupId( String )
181 
182     /**
183      * Set the version of the artifact.
184      * 
185      * @param version a version object.
186      */
187     public void setVersion( String version )
188     {
189         this.version = version;
190     } //-- void setVersion( String )
191 
192     /**
193      * Method toString.
194      * 
195      * @return String
196      */
197     public java.lang.String toString()
198     {
199         StringBuilder buf = new StringBuilder( 128 );
200 
201         buf.append( "groupId = '" );
202         buf.append( getGroupId() );
203         buf.append( "'" );
204         buf.append( "\n" ); 
205         buf.append( "artifactId = '" );
206         buf.append( getArtifactId() );
207         buf.append( "'" );
208         buf.append( "\n" ); 
209         buf.append( "version = '" );
210         buf.append( getVersion() );
211         buf.append( "'" );
212         buf.append( "\n" ); 
213         buf.append( "classifier = '" );
214         buf.append( getClassifier() );
215         buf.append( "'" );
216 
217         return buf.toString();
218     } //-- java.lang.String toString()
219 
220 }