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.naming
Class AbstractTypeParameterNameCheck

    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.AbstractFormatCheck
                      com.puppycrawl.tools.checkstyle.checks.naming.AbstractNameCheck
                          com.puppycrawl.tools.checkstyle.checks.naming.AbstractTypeParameterNameCheck

All Implemented Interfaces:
  Configurable, Contextualizable

Direct Known Subclasses:
  ClassTypeParameterNameCheck, MethodTypeParameterNameCheck

    public abstract class AbstractTypeParameterNameCheck

extends AbstractNameCheck

Abstract class for checking if a class/method type parameter's name conforms to a format specified by the format property.

This class extends `AbstractNameCheck`

Version:
  1.0
Author:
  Travis Schneeberger

Constructor Summary
`AbstractTypeParameterNameCheck(String aFormat)` Creates a new `AbstractTypeParameterNameCheck` instance.

Method Summary
`int[]` | `getDefaultTokens()` Returns the default token a check is interested in.
`protected abstract int` | `getLocation()` This method must be overriden to specify the location of the type parameter to check.
`void` | `init()` Initialise the check.
`protected boolean` | `mustCheckName(DetailAST aAST)` Decides whether the name of an AST should be checked against the format regexp.

Methods inherited from class com.puppycrawl.tools.checkstyle.checks.naming.AbstractNameCheck
`visitToken`

Methods inherited from class com.puppycrawl.tools.checkstyle.checks.AbstractFormatCheck
`getFormat, getRegexp, setCompileFlags, setFormat`

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

Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
`getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, 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

### AbstractTypeParameterNameCheck

    public AbstractTypeParameterNameCheck(String aFormat)

  Creates a new `AbstractTypeParameterNameCheck` instance.

  Parameters:
    `aFormat` - format to check with

Method Detail

### getDefaultTokens

    public final 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:
    `TokenTypes`

### init

    public final void init()

  Description copied from class: `Check`
  Initialise the check. This is the time to verify that the check has everything required to perform it job.

  Overrides:
    `init` in class `Check`

### mustCheckName

    protected final boolean mustCheckName(DetailAST aAST)

  Description copied from class: `AbstractNameCheck`
  Decides whether the name of an AST should be checked against the format regexp.

  Overrides:
    `mustCheckName` in class `AbstractNameCheck`
  Parameters:
    `aAST` - the AST to check.
  Returns:
    true if the IDENT subnode of aAST should be checked against the format regexp.

### getLocation

    protected abstract int getLocation()

  This method must be overriden to specify the location of the type parameter to check.

  Returns:
    `TokenTypes.CLASS_DEF` or `TokenTypes.METHOD_DEF`

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

Copyright © 2001-2011. All Rights Reserved.