Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
JavadocPathArtifact |
|
| 1.4444444444444444;1,444 |
1 | /* | |
2 | =================== DO NOT EDIT THIS FILE ==================== | |
3 | Generated by Modello 1.0.2 on 2009-07-26 08:05:24, | |
4 | any modifications will be overwritten. | |
5 | ============================================================== | |
6 | */ | |
7 | ||
8 | package org.apache.maven.plugin.javadoc.options; | |
9 | ||
10 | /** | |
11 | * An artifact object used by Javadoc path options like -docletpath | |
12 | * or -tagletpath. | |
13 | * | |
14 | * @version $Revision$ $Date$ | |
15 | */ | |
16 | 8 | public class JavadocPathArtifact |
17 | implements java.io.Serializable | |
18 | { | |
19 | ||
20 | //--------------------------/ | |
21 | //- Class/Member Variables -/ | |
22 | //--------------------------/ | |
23 | ||
24 | /** | |
25 | * The id of the group of the artifact. | |
26 | */ | |
27 | private String groupId; | |
28 | ||
29 | /** | |
30 | * The id of the artifact. | |
31 | */ | |
32 | private String artifactId; | |
33 | ||
34 | /** | |
35 | * The version of the artifact. | |
36 | */ | |
37 | private String version; | |
38 | ||
39 | ||
40 | //-----------/ | |
41 | //- Methods -/ | |
42 | //-----------/ | |
43 | ||
44 | /** | |
45 | * Method equals. | |
46 | * | |
47 | * @param other | |
48 | * @return boolean | |
49 | */ | |
50 | public boolean equals( Object other ) | |
51 | { | |
52 | 0 | if ( this == other ) |
53 | { | |
54 | 0 | return true; |
55 | } | |
56 | ||
57 | 0 | if ( !( other instanceof JavadocPathArtifact ) ) |
58 | { | |
59 | 0 | return false; |
60 | } | |
61 | ||
62 | 0 | JavadocPathArtifact that = (JavadocPathArtifact) other; |
63 | 0 | boolean result = true; |
64 | ||
65 | 0 | result = result && ( getGroupId() == null ? that.getGroupId() == null : getGroupId().equals( that.getGroupId() ) ); |
66 | 0 | result = result && ( getArtifactId() == null ? that.getArtifactId() == null : getArtifactId().equals( that.getArtifactId() ) ); |
67 | 0 | result = result && ( getVersion() == null ? that.getVersion() == null : getVersion().equals( that.getVersion() ) ); |
68 | ||
69 | 0 | return result; |
70 | } //-- boolean equals( Object ) | |
71 | ||
72 | /** | |
73 | * Get the id of the artifact. | |
74 | * | |
75 | * @return String | |
76 | */ | |
77 | public String getArtifactId() | |
78 | { | |
79 | 15 | return this.artifactId; |
80 | } //-- String getArtifactId() | |
81 | ||
82 | /** | |
83 | * Get the id of the group of the artifact. | |
84 | * | |
85 | * @return String | |
86 | */ | |
87 | public String getGroupId() | |
88 | { | |
89 | 24 | return this.groupId; |
90 | } //-- String getGroupId() | |
91 | ||
92 | /** | |
93 | * Get the version of the artifact. | |
94 | * | |
95 | * @return String | |
96 | */ | |
97 | public String getVersion() | |
98 | { | |
99 | 15 | return this.version; |
100 | } //-- String getVersion() | |
101 | ||
102 | /** | |
103 | * Method hashCode. | |
104 | * | |
105 | * @return int | |
106 | */ | |
107 | public int hashCode() | |
108 | { | |
109 | 0 | int result = 17; |
110 | ||
111 | 0 | result = 37 * result + ( groupId != null ? groupId.hashCode() : 0 ); |
112 | 0 | result = 37 * result + ( artifactId != null ? artifactId.hashCode() : 0 ); |
113 | 0 | result = 37 * result + ( version != null ? version.hashCode() : 0 ); |
114 | ||
115 | 0 | return result; |
116 | } //-- int hashCode() | |
117 | ||
118 | /** | |
119 | * Set the id of the artifact. | |
120 | * | |
121 | * @param artifactId | |
122 | */ | |
123 | public void setArtifactId( String artifactId ) | |
124 | { | |
125 | 8 | this.artifactId = artifactId; |
126 | 8 | } //-- void setArtifactId( String ) |
127 | ||
128 | /** | |
129 | * Set the id of the group of the artifact. | |
130 | * | |
131 | * @param groupId | |
132 | */ | |
133 | public void setGroupId( String groupId ) | |
134 | { | |
135 | 8 | this.groupId = groupId; |
136 | 8 | } //-- void setGroupId( String ) |
137 | ||
138 | /** | |
139 | * Set the version of the artifact. | |
140 | * | |
141 | * @param version | |
142 | */ | |
143 | public void setVersion( String version ) | |
144 | { | |
145 | 8 | this.version = version; |
146 | 8 | } //-- void setVersion( String ) |
147 | ||
148 | /** | |
149 | * Method toString. | |
150 | * | |
151 | * @return String | |
152 | */ | |
153 | public java.lang.String toString() | |
154 | { | |
155 | 0 | StringBuffer buf = new StringBuffer( 128 ); |
156 | ||
157 | 0 | buf.append( "groupId = '" ); |
158 | 0 | buf.append( getGroupId() ); |
159 | 0 | buf.append( "'" ); |
160 | 0 | buf.append( "\n" ); |
161 | 0 | buf.append( "artifactId = '" ); |
162 | 0 | buf.append( getArtifactId() ); |
163 | 0 | buf.append( "'" ); |
164 | 0 | buf.append( "\n" ); |
165 | 0 | buf.append( "version = '" ); |
166 | 0 | buf.append( getVersion() ); |
167 | 0 | buf.append( "'" ); |
168 | ||
169 | 0 | return buf.toString(); |
170 | } //-- java.lang.String toString() | |
171 | ||
172 | ||
173 | } |