public class RequireJavadoc
extends com.sun.tools.doclets.standard.Standard
| Modifier and Type | Class and Description |
|---|---|
private class |
RequireJavadoc.Undocumented
An undocumented identifier and the file and line number where it appears.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) java.util.List<RequireJavadoc.Undocumented> |
errors
All the errors this doclet will report.
|
(package private) java.util.Set<com.sun.javadoc.PackageDoc> |
packages
All packages that have been seen and checked so far.
|
(package private) static boolean |
relativePaths
If true, print filenames relative to working directory.
|
(package private) static @MonotonicNonNull java.util.regex.Pattern |
skip
If non-null, matches classes where no problems should be reported.
|
private static java.lang.String |
USAGE |
| Constructor and Description |
|---|
RequireJavadoc()
Creates a new RequireJavadoc instance.
|
| Modifier and Type | Method and Description |
|---|---|
private boolean |
isEnumValuesOrValueOf(com.sun.javadoc.MethodDoc md)
Return true if the method is
values or valueOf for an enum. |
private boolean |
isOverride(com.sun.javadoc.MethodDoc md)
Return true if this method is annotated with
@Override. |
private boolean |
isSyntheticForNestedConstructor(com.sun.javadoc.ConstructorDoc cd)
Return true if this method is a synthetic default constructor.
|
static int |
optionLength(java.lang.String option)
Given a command-line option of this doclet, returns the number of arguments you must specify on
the command line for the given option.
|
private void |
processClass(com.sun.javadoc.ClassDoc cd)
Require documentation of the given class and its package.
|
private void |
requireCommentText(com.sun.javadoc.Doc d)
Require a documentation string for the given Java element.
|
static boolean |
start(com.sun.javadoc.RootDoc root)
The entry point to this doclet.
|
static boolean |
validOptions(java.lang.String[][] options,
com.sun.javadoc.DocErrorReporter reporter)
Tests the validity of command-line arguments passed to this doclet.
|
java.util.List<RequireJavadoc.Undocumented> errors
java.util.Set<com.sun.javadoc.PackageDoc> packages
static boolean relativePaths
static @MonotonicNonNull java.util.regex.Pattern skip
private static final java.lang.String USAGE
public static boolean start(com.sun.javadoc.RootDoc root)
private void processClass(com.sun.javadoc.ClassDoc cd)
cd - the class to require documentation ofprivate boolean isOverride(com.sun.javadoc.MethodDoc md)
@Override.md - the method to check for an @Override annotation@Overrideprivate boolean isSyntheticForNestedConstructor(com.sun.javadoc.ConstructorDoc cd)
cd - the constructor to checkcd is a synthetic constructorprivate boolean isEnumValuesOrValueOf(com.sun.javadoc.MethodDoc md)
values or valueOf for an enum.md - the MethodDoc to testvalues or valueOf for an enumprivate void requireCommentText(com.sun.javadoc.Doc d)
d - any Java elementpublic static int optionLength(java.lang.String option)
option - the command-line optionpublic static boolean validOptions(java.lang.String[][] options,
com.sun.javadoc.DocErrorReporter reporter)
Also sets fields from the command-line arguments.
options - the command-line options to be checked: an array of 1- or 2-element arrays,
where the length depends on optionLength(java.lang.String) applied to the first elementreporter - where to report errors