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 MethodTypeParameterNameCheck

    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
                              com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterNameCheck

All Implemented Interfaces:
  Configurable, Contextualizable

    public class MethodTypeParameterNameCheck

extends AbstractTypeParameterNameCheck

Checks that class type parameter names conform to a format specified by the format property. The format is a `regular expression` and defaults to ^[A-Z]$.

An example of how to configure the check is:

     <module name="MethodTypeParameterName"/>

An example of how to configure the check for names that are only a single letter is

     <module name="MethodTypeParameterName">
        <property name="format" value="^[a-zA-Z]$"/>
     </module>

Version:
  1.0
Author:
  Travis Schneeberger

Constructor Summary
`MethodTypeParameterNameCheck()` Creates a new `MethodTypeParameterNameCheck` instance.

Method Summary
`protected int` | `getLocation()` This method must be overriden to specify the location of the type parameter to check.

Methods inherited from class com.puppycrawl.tools.checkstyle.checks.naming.AbstractTypeParameterNameCheck
`getDefaultTokens, init, mustCheckName`

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

### MethodTypeParameterNameCheck

    public MethodTypeParameterNameCheck()

  Creates a new `MethodTypeParameterNameCheck` instance.

Method Detail

### getLocation

    protected final int getLocation()

  Description copied from class: `AbstractTypeParameterNameCheck`
  This method must be overriden to specify the location of the type parameter to check.

  Specified by:
    `getLocation` in class `AbstractTypeParameterNameCheck`
  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.