Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Taglet |
|
| 1.3636363636363635;1,364 |
1 | /* | |
2 | * $Id: org.apache.maven.plugin.javadoc.options.Taglet.html 829389 2012-08-19 17:23:07Z hboutemy $ | |
3 | */ | |
4 | ||
5 | package org.apache.maven.plugin.javadoc.options; | |
6 | ||
7 | //---------------------------------/ | |
8 | //- Imported classes and packages -/ | |
9 | //---------------------------------/ | |
10 | ||
11 | import java.util.Date; | |
12 | ||
13 | /** | |
14 | * A Taglet parameter. | |
15 | * | |
16 | * @version $Revision: 829389 $ $Date: 2012-08-19 17:23:07 +0000 (Sun, 19 Aug 2012) $ | |
17 | */ | |
18 | 0 | public class Taglet implements java.io.Serializable { |
19 | ||
20 | ||
21 | //--------------------------/ | |
22 | //- Class/Member Variables -/ | |
23 | //--------------------------/ | |
24 | ||
25 | /** | |
26 | * tagletClass is the fully-qualified name for the taglet class. | |
27 | */ | |
28 | private String tagletClass; | |
29 | ||
30 | /** | |
31 | * Specifies the search paths for finding taglet class files | |
32 | * (.class). | |
33 | */ | |
34 | private String tagletpath; | |
35 | ||
36 | /** | |
37 | * Specifies the taglet artifact to be included in the | |
38 | * tagletpath option for finding taglet class files (.class). | |
39 | */ | |
40 | private TagletArtifact tagletArtifact; | |
41 | ||
42 | ||
43 | //-----------/ | |
44 | //- Methods -/ | |
45 | //-----------/ | |
46 | ||
47 | /** | |
48 | * Method equals. | |
49 | * | |
50 | * @param other | |
51 | * @return boolean | |
52 | */ | |
53 | public boolean equals(Object other) | |
54 | { | |
55 | 0 | if ( this == other) |
56 | { | |
57 | 0 | return true; |
58 | } | |
59 | ||
60 | 0 | if ( !(other instanceof Taglet) ) |
61 | { | |
62 | 0 | return false; |
63 | } | |
64 | ||
65 | 0 | Taglet that = (Taglet) other; |
66 | 0 | boolean result = true; |
67 | ||
68 | 0 | result = result && ( getTagletClass() == null ? that.getTagletClass() == null : getTagletClass().equals( that.getTagletClass() ) ); |
69 | 0 | result = result && ( getTagletpath() == null ? that.getTagletpath() == null : getTagletpath().equals( that.getTagletpath() ) ); |
70 | ||
71 | 0 | return result; |
72 | } //-- boolean equals(Object) | |
73 | ||
74 | /** | |
75 | * Get specifies the taglet artifact to be included in the | |
76 | * tagletpath option for finding taglet class files (.class). | |
77 | * | |
78 | * @return TagletArtifact | |
79 | */ | |
80 | public TagletArtifact getTagletArtifact() | |
81 | { | |
82 | 0 | return this.tagletArtifact; |
83 | } //-- TagletArtifact getTagletArtifact() | |
84 | ||
85 | /** | |
86 | * Get tagletClass is the fully-qualified name for the taglet | |
87 | * class. | |
88 | * | |
89 | * @return String | |
90 | */ | |
91 | public String getTagletClass() | |
92 | { | |
93 | 0 | return this.tagletClass; |
94 | } //-- String getTagletClass() | |
95 | ||
96 | /** | |
97 | * Get specifies the search paths for finding taglet class | |
98 | * files (.class). | |
99 | * | |
100 | * @return String | |
101 | */ | |
102 | public String getTagletpath() | |
103 | { | |
104 | 0 | return this.tagletpath; |
105 | } //-- String getTagletpath() | |
106 | ||
107 | /** | |
108 | * Method hashCode. | |
109 | * | |
110 | * @return int | |
111 | */ | |
112 | public int hashCode() | |
113 | { | |
114 | 0 | int result = 17; |
115 | ||
116 | 0 | result = 37 * result + ( tagletClass != null ? tagletClass.hashCode() : 0 ); |
117 | 0 | result = 37 * result + ( tagletpath != null ? tagletpath.hashCode() : 0 ); |
118 | ||
119 | 0 | return result; |
120 | } //-- int hashCode() | |
121 | ||
122 | /** | |
123 | * Set specifies the taglet artifact to be included in the | |
124 | * tagletpath option for finding taglet class files (.class). | |
125 | * | |
126 | * @param tagletArtifact | |
127 | */ | |
128 | public void setTagletArtifact(TagletArtifact tagletArtifact) | |
129 | { | |
130 | 0 | this.tagletArtifact = tagletArtifact; |
131 | 0 | } //-- void setTagletArtifact(TagletArtifact) |
132 | ||
133 | /** | |
134 | * Set tagletClass is the fully-qualified name for the taglet | |
135 | * class. | |
136 | * | |
137 | * @param tagletClass | |
138 | */ | |
139 | public void setTagletClass(String tagletClass) | |
140 | { | |
141 | 0 | this.tagletClass = tagletClass; |
142 | 0 | } //-- void setTagletClass(String) |
143 | ||
144 | /** | |
145 | * Set specifies the search paths for finding taglet class | |
146 | * files (.class). | |
147 | * | |
148 | * @param tagletpath | |
149 | */ | |
150 | public void setTagletpath(String tagletpath) | |
151 | { | |
152 | 0 | this.tagletpath = tagletpath; |
153 | 0 | } //-- void setTagletpath(String) |
154 | ||
155 | /** | |
156 | * Method toString. | |
157 | * | |
158 | * @return java.lang.String | |
159 | */ | |
160 | public java.lang.String toString() | |
161 | { | |
162 | 0 | StringBuffer buf = new StringBuffer(); |
163 | ||
164 | 0 | buf.append( "tagletClass = '" ); |
165 | 0 | buf.append( getTagletClass() ); |
166 | 0 | buf.append( "'" ); |
167 | 0 | buf.append( "\n" ); |
168 | 0 | buf.append( "tagletpath = '" ); |
169 | 0 | buf.append( getTagletpath() ); |
170 | 0 | buf.append( "'" ); |
171 | ||
172 | 0 | return buf.toString(); |
173 | } //-- java.lang.String toString() | |
174 | ||
175 | ||
176 | 0 | private String modelEncoding = "UTF-8"; |
177 | ||
178 | /** | |
179 | * Set an encoding used for reading/writing the model. | |
180 | * | |
181 | * @param modelEncoding the encoding used when reading/writing the model. | |
182 | */ | |
183 | public void setModelEncoding( String modelEncoding ) | |
184 | { | |
185 | 0 | this.modelEncoding = modelEncoding; |
186 | 0 | } |
187 | ||
188 | /** | |
189 | * @return the current encoding used when reading/writing this model. | |
190 | */ | |
191 | public String getModelEncoding() | |
192 | { | |
193 | 0 | return modelEncoding; |
194 | } | |
195 | } |