diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java index 60c7ca13b..1fe4e9f9b 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java @@ -40,46 +40,7 @@ import com.puppycrawl.tools.checkstyle.api.Utils; import com.puppycrawl.tools.checkstyle.checks.AbstractTypeAwareCheck; /** - *
- * Checks the Javadoc of a method or constructor. By default, does not check for
- * unused throws. To allow documented java.lang.RuntimeException
- * s that are not declared, set property allowUndeclaredRTE to true. The scope
- * to verify is specified using the {@link Scope}class and defaults to
- * {@link Scope#PRIVATE}. To verify another scope, set property scope to one of
- * the {@link Scope}constants.
- *
- * Error messages about parameters for which no param tags are present can be
- * suppressed by defining property allowMissingParamTags. Error
- * messages about exceptions which are declared to be thrown, but for which no
- * throws tag is present can be suppressed by defining property
- * allowMissingThrowsTags. Error messages about methods which
- * return non-void but for which no return tag is present can be suppressed by
- * defining property allowMissingReturnTag.
- *
- * An example of how to configure the check is: - *
- * - *- * <module name="JavadocMethod"/> - *- * - *
- * An example of how to configure the check to check to allow documentation of - * undeclared RuntimeExceptions and for the {@link Scope#PUBLIC}scope, while - * ignoring any missing param tags is: - *
- * - *- * <module name="JavadocMethod"> - * <property name="scope" value="public"/> - * <property name="allowUndeclaredRTE" - value="true"/> - * <property name="allowMissingParamTags" - value="true"/> - * </module> - *+ * Checks the Javadoc of a method or constructor. * * @author Oliver Burn * @author Rick Giles diff --git a/src/xdocs/config_javadoc.xml b/src/xdocs/config_javadoc.xml index 55e35df28..57071e03d 100755 --- a/src/xdocs/config_javadoc.xml +++ b/src/xdocs/config_javadoc.xml @@ -182,47 +182,50 @@
- Checks to ensure that the following tags exist (if required):
+ Checks the Javadoc of a method or constructor. By default,
+ does not check for unused throws. To allow documented
+ java.lang.RuntimeExceptions that are not
+ declared, set property allowUndeclaredRTE to true. The scope
+ to verify is specified using the Scope class and
+ defaults to Scope.PRIVATE. To verify another
+ scope, set property scope to one of the Scope
+ constants.
- For example, the following is valid:
+ Error messages about parameters for which no param tags are
+ present can be suppressed by defining property
+ allowMissingParamTags. Error messages about
+ exceptions which are declared to be thrown, but for which no
+ throws tag is present can be suppressed by defining property
+ allowMissingThrowsTags. Error messages about
+ methods which return non-void but for which no return tag is
+ present can be suppressed by defining property
+ allowMissingReturnTag.
- This supports the convention in the Sun - Javadoc Guidelines and the "Effective Java" book. + An example of how to configure the check is:
+ ++<module name="JavadocMethod"/> ++ +
+ An example of how to configure the check to check to allow
+ documentation of undeclared RuntimeExceptions and for the
+ Scope.PUBLIC scope, while ignoring any missing
+ param tags is:
+
+<module name="JavadocMethod"> + <property name="scope" value="public"/> + <property name="allowUndeclaredRTE" value="true"/> + <property name="allowMissingParamTags" value="true"/> +</module> +
+public void setNumber(final int number)
+{
+ mNumber = number;
+}
+
+public int getNumber()
+{
+ return mNumber;
+}
+
+public boolean isSomething()
+{
+ return false;
+}
+
+ allowMissingPropertyJavadoc on the JavadocMethod
+ check.