Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.puppycrawl.tools.checkstyle.checks.javadoc
Class JavadocTypeCheck

    java.lang.Object
      com.puppycrawl.tools.checkstyle.api.AutomaticBean
          com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
              com.puppycrawl.tools.checkstyle.api.Check
                  com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTypeCheck

All Implemented Interfaces:
  Configurable, Contextualizable

public class JavadocTypeCheck
extends Check

Checks the Javadoc of a type. By default, does not check for author or version tags. 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. To define the format for an author tag or a version tag, set property authorFormat or versionFormat respectively to a regular expression.

An example of how to configure the check is:

     <module name="JavadocType"/>

An example of how to configure the check for the `Scope.PUBLIC` scope is:

     <module name="JavadocType">
        <property name="scope" value="public"/>
     </module>

An example of how to configure the check for an author tag and a version tag is:

     <module name="JavadocType">
        <property name="authorFormat" value="\S"/>
        <property name="versionFormat" value="\S"/>
     </module>

An example of how to configure the check for a CVS revision version tag is:

     <module name="JavadocType">
        <property name="versionFormat" value="\$Revision.*\$"/>
     </module>

Version:
  1.0
Author:
  Oliver Burn

Constructor Summary
`JavadocTypeCheck()`

Method Summary
`int[]` | `getDefaultTokens()` Returns the default token a check is interested in.
`void` | `setAuthorFormat(java.lang.String aFormat)` Set the author tag pattern.
`void` | `setExcludeScope(java.lang.String aScope)` Set the excludeScope.
`void` | `setScope(java.lang.String aFrom)` Sets the scope to check.
`void` | `setVersionFormat(java.lang.String aFormat)` Set the version format pattern.
`void` | `visitToken(DetailAST aAST)` Called to process a token.

Methods inherited from class com.puppycrawl.tools.checkstyle.api.Check
`beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getFileContents, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens`

Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
`getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, log, setSeverity`

Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean
`configure, contextualize, finishLocalSetup, getConfiguration, setupChild`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JavadocTypeCheck

    public JavadocTypeCheck()

Method Detail

### setScope

    public void setScope(java.lang.String aFrom)

  Sets the scope to check.

  Parameters:
    `aFrom` - string to set scope from

### setExcludeScope

    public void setExcludeScope(java.lang.String aScope)

  Set the excludeScope.

  Parameters:
    `aScope` - a `String` value

### setAuthorFormat

    public void setAuthorFormat(java.lang.String aFormat)
                         throws org.apache.commons.beanutils.ConversionException

  Set the author tag pattern.

  Parameters:
    `aFormat` - a `String` value
  Throws:
    `org.apache.commons.beanutils.ConversionException` - unable to parse aFormat

### setVersionFormat

    public void setVersionFormat(java.lang.String aFormat)
                          throws org.apache.commons.beanutils.ConversionException

  Set the version format pattern.

  Parameters:
    `aFormat` - a `String` value
  Throws:
    `org.apache.commons.beanutils.ConversionException` - unable to parse aFormat

### getDefaultTokens

    public int[] getDefaultTokens()

  Description copied from class: `Check`
  Returns the default token a check is interested in. Only used if the configuration for a check does not define the tokens.

  Specified by:
    `getDefaultTokens` in class `Check`
  Returns:
    the default tokens
  See Also:
    `Check`

### visitToken

    public void visitToken(DetailAST aAST)

  Description copied from class: `Check`
  Called to process a token.

  Overrides:
    `visitToken` in class `Check`
  Parameters:
    `aAST` - the token to process
  See Also:
    `Check`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Back to the Checkstyle Home Page
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD