Skip to content

Commit 534536a

Browse files
committed
javadoc: deperecate overview.html and package.html support. #1415
1 parent e4440ed commit 534536a

File tree

1 file changed

+21
-52
lines changed

1 file changed

+21
-52
lines changed

src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocTagInfo.java

+21-52
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public enum JavadocTagInfo {
6464
/**
6565
* {@code @author}.
6666
*/
67-
AUTHOR("@author", "author", Type.BLOCK, true, true) {
67+
AUTHOR("@author", "author", Type.BLOCK) {
6868
/** {@inheritDoc} */
6969
@Override
7070
public boolean isValidOn(final DetailAST ast) {
@@ -80,7 +80,7 @@ public boolean isValidOn(final DetailAST ast) {
8080
/**
8181
* {@code {@code}}.
8282
*/
83-
CODE("{@code}", "code", Type.INLINE, true, true) {
83+
CODE("{@code}", "code", Type.INLINE) {
8484
/** {@inheritDoc} */
8585
@Override
8686
public boolean isValidOn(final DetailAST ast) {
@@ -100,7 +100,7 @@ public boolean isValidOn(final DetailAST ast) {
100100
/**
101101
* {@code {@docRoot}}.
102102
*/
103-
DOC_ROOT("{@docRoot}", "docRoot", Type.INLINE, true, true) {
103+
DOC_ROOT("{@docRoot}", "docRoot", Type.INLINE) {
104104
/** {@inheritDoc} */
105105
@Override
106106
public boolean isValidOn(final DetailAST ast) {
@@ -119,7 +119,7 @@ public boolean isValidOn(final DetailAST ast) {
119119
/**
120120
* {@code @deprecated}.
121121
*/
122-
DEPRECATED("@deprecated", "deprecated", Type.BLOCK, false, false) {
122+
DEPRECATED("@deprecated", "deprecated", Type.BLOCK) {
123123
/** {@inheritDoc} */
124124
@Override
125125
public boolean isValidOn(final DetailAST ast) {
@@ -140,7 +140,7 @@ public boolean isValidOn(final DetailAST ast) {
140140
/**
141141
* {@code @exception}.
142142
*/
143-
EXCEPTION("@exception", "exception", Type.BLOCK, false, false) {
143+
EXCEPTION("@exception", "exception", Type.BLOCK) {
144144
/** {@inheritDoc} */
145145
@Override
146146
public boolean isValidOn(final DetailAST ast) {
@@ -152,7 +152,7 @@ public boolean isValidOn(final DetailAST ast) {
152152
/**
153153
* {@code {@inheritDoc}}.
154154
*/
155-
INHERIT_DOC("{@inheritDoc}", "inheritDoc", Type.INLINE, false, false) {
155+
INHERIT_DOC("{@inheritDoc}", "inheritDoc", Type.INLINE) {
156156
/** {@inheritDoc} */
157157
@Override
158158
public boolean isValidOn(final DetailAST ast) {
@@ -168,7 +168,7 @@ public boolean isValidOn(final DetailAST ast) {
168168
/**
169169
* {@code {@link}}.
170170
*/
171-
LINK("{@link}", "link", Type.INLINE, true, true) {
171+
LINK("{@link}", "link", Type.INLINE) {
172172
/** {@inheritDoc} */
173173
@Override
174174
public boolean isValidOn(final DetailAST ast) {
@@ -187,7 +187,7 @@ public boolean isValidOn(final DetailAST ast) {
187187
/**
188188
* {@code {@linkplain}}.
189189
*/
190-
LINKPLAIN("{@linkplain}", "linkplain", Type.INLINE, true, true) {
190+
LINKPLAIN("{@linkplain}", "linkplain", Type.INLINE) {
191191
/** {@inheritDoc} */
192192
@Override
193193
public boolean isValidOn(final DetailAST ast) {
@@ -206,7 +206,7 @@ public boolean isValidOn(final DetailAST ast) {
206206
/**
207207
* {@code {@literal}}.
208208
*/
209-
LITERAL("{@literal}", "literal", Type.INLINE, true, true) {
209+
LITERAL("{@literal}", "literal", Type.INLINE) {
210210
/** {@inheritDoc} */
211211
@Override
212212
public boolean isValidOn(final DetailAST ast) {
@@ -225,7 +225,7 @@ public boolean isValidOn(final DetailAST ast) {
225225
/**
226226
* {@code @param}.
227227
*/
228-
PARAM("@param", "param", Type.BLOCK, false, false) {
228+
PARAM("@param", "param", Type.BLOCK) {
229229
/** {@inheritDoc} */
230230
@Override
231231
public boolean isValidOn(final DetailAST ast) {
@@ -240,7 +240,7 @@ public boolean isValidOn(final DetailAST ast) {
240240
/**
241241
* {@code @return}.
242242
*/
243-
RETURN("@return", "return", Type.BLOCK, false, false) {
243+
RETURN("@return", "return", Type.BLOCK) {
244244
/** {@inheritDoc} */
245245
@Override
246246
public boolean isValidOn(final DetailAST ast) {
@@ -257,7 +257,7 @@ public boolean isValidOn(final DetailAST ast) {
257257
/**
258258
* {@code @see}.
259259
*/
260-
SEE("@see", "see", Type.BLOCK, true, true) {
260+
SEE("@see", "see", Type.BLOCK) {
261261
/** {@inheritDoc} */
262262
@Override
263263
public boolean isValidOn(final DetailAST ast) {
@@ -277,7 +277,7 @@ public boolean isValidOn(final DetailAST ast) {
277277
/**
278278
* {@code @serial}.
279279
*/
280-
SERIAL("@serial", "serial", Type.BLOCK, true, false) {
280+
SERIAL("@serial", "serial", Type.BLOCK) {
281281
/** {@inheritDoc} */
282282
@Override
283283
public boolean isValidOn(final DetailAST ast) {
@@ -291,7 +291,7 @@ public boolean isValidOn(final DetailAST ast) {
291291
/**
292292
* {@code @serialData}.
293293
*/
294-
SERIAL_DATA("@serialData", "serialData", Type.BLOCK, false, false) {
294+
SERIAL_DATA("@serialData", "serialData", Type.BLOCK) {
295295
/** {@inheritDoc} */
296296
@Override
297297
public boolean isValidOn(final DetailAST ast) {
@@ -314,7 +314,7 @@ public boolean isValidOn(final DetailAST ast) {
314314
/**
315315
* {@code @serialField}.
316316
*/
317-
SERIAL_FIELD("@serialField", "serialField", Type.BLOCK, false, false) {
317+
SERIAL_FIELD("@serialField", "serialField", Type.BLOCK) {
318318
/** {@inheritDoc} */
319319
@Override
320320
public boolean isValidOn(final DetailAST ast) {
@@ -331,7 +331,7 @@ public boolean isValidOn(final DetailAST ast) {
331331
/**
332332
* {@code @since}.
333333
*/
334-
SINCE("@since", "since", Type.BLOCK, true, true) {
334+
SINCE("@since", "since", Type.BLOCK) {
335335
/** {@inheritDoc} */
336336
@Override
337337
public boolean isValidOn(final DetailAST ast) {
@@ -351,7 +351,7 @@ public boolean isValidOn(final DetailAST ast) {
351351
/**
352352
* {@code @throws}.
353353
*/
354-
THROWS("@throws", "throws", Type.BLOCK, false, false) {
354+
THROWS("@throws", "throws", Type.BLOCK) {
355355
/** {@inheritDoc} */
356356
@Override
357357
public boolean isValidOn(final DetailAST ast) {
@@ -364,7 +364,7 @@ public boolean isValidOn(final DetailAST ast) {
364364
/**
365365
* {@code {@value}}.
366366
*/
367-
VALUE("{@value}", "value", Type.INLINE, true, true) {
367+
VALUE("{@value}", "value", Type.INLINE) {
368368
/** {@inheritDoc} */
369369
@Override
370370
public boolean isValidOn(final DetailAST ast) {
@@ -384,7 +384,7 @@ public boolean isValidOn(final DetailAST ast) {
384384
/**
385385
* {@code @version}.
386386
*/
387-
VERSION("@version", "version", Type.BLOCK, true, true) {
387+
VERSION("@version", "version", Type.BLOCK) {
388388
/** {@inheritDoc} */
389389
@Override
390390
public boolean isValidOn(final DetailAST ast) {
@@ -424,30 +424,19 @@ public boolean isValidOn(final DetailAST ast) {
424424
private final String name;
425425
/** the tag type **/
426426
private final Type type;
427-
/** if tag is valid in package.html **/
428-
private final boolean validInPackageHtml;
429-
/** if tag is valid in overview.html **/
430-
private final boolean validInOverviewHtml;
431427

432428
/**
433429
* Sets the various properties of a Javadoc tag.
434430
*
435431
* @param text the tag text
436432
* @param name the tag name
437433
* @param type the type of tag
438-
* @param validInPackageHtml whether the tag is valid
439-
* in package.html file
440-
* @param validInOverviewHtml whether the tag is valid
441-
* in overview.html file
442434
*/
443435
private JavadocTagInfo(final String text, final String name,
444-
final Type type, final boolean validInPackageHtml,
445-
final boolean validInOverviewHtml) {
436+
final Type type) {
446437
this.text = text;
447438
this.name = name;
448439
this.type = type;
449-
this.validInPackageHtml = validInPackageHtml;
450-
this.validInOverviewHtml = validInOverviewHtml;
451440
}
452441

453442
/**
@@ -471,24 +460,6 @@ private JavadocTagInfo(final String text, final String name,
471460
*/
472461
public abstract boolean isValidOn(DetailAST ast);
473462

474-
/**
475-
* Checks if tag is valid in a package.html Javadoc file.
476-
*
477-
* @return true if tag is valid.
478-
*/
479-
public boolean isValidInPackageHtml() {
480-
return this.validInPackageHtml;
481-
}
482-
483-
/**
484-
* Checks if tag is valid in a overview.html Javadoc file.
485-
*
486-
* @return true if tag is valid.
487-
*/
488-
public boolean isValidInOverviewHtml() {
489-
return this.validInOverviewHtml;
490-
}
491-
492463
/**
493464
* Gets the tag text.
494465
* @return the tag text
@@ -573,9 +544,7 @@ public static boolean isValidName(final String name) {
573544
@Override
574545
public String toString() {
575546
return "text [" + this.text + "] name [" + this.name
576-
+ "] type [" + this.type
577-
+ "] validInPackageHtml [" + this.validInPackageHtml
578-
+ "] validInOverviewHtml [" + this.validInOverviewHtml + "]";
547+
+ "] type [" + this.type;
579548
}
580549

581550
/**

0 commit comments

Comments
 (0)