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.j2ee
Class MethodChecker

    java.lang.Object
      com.puppycrawl.tools.checkstyle.checks.j2ee.MethodChecker

Direct Known Subclasses:
  BeanMethodChecker, HomeInterfaceMethodChecker, LocalInterfaceMethodChecker, RemoteInterfaceMethodChecker

    public abstract class MethodChecker

extends Object

Root class for method checks for a client Check.

Author:
  Rick Giles

Constructor Summary
`MethodChecker(AbstractJ2eeCheck aCheck)` Constructs a `MethodChecker`.

Method Summary
`abstract void` | `checkMethod(DetailAST aMethodAST)` Checks whether a method satisfies component requirements.
`void` | `checkMethod(DetailAST aMethodAST, boolean aAllowFinal)` Checks whether a method satisfies public, non-static, and final requirements.
`void` | `checkMethods(DetailAST aAST)` Checks that the methods of a component satisfy requirements.
`protected void` | `checkNotThrows(DetailAST aMethodAST, String aException)` Checks that the throws clause of a method definition does no include an Exception.
`protected void` | `checkThrows(DetailAST aMethodAST, String aException)` Checks that the throws clause of a method definition includes an Exception.
`protected AbstractJ2eeCheck` | `getCheck()` Gets the client Check.
`protected void` | `log(DetailAST aMethodAST, String aKey, Object[] aArgs)` Logs an error message for a method.
`protected void` | `logName(DetailAST aMethodAST, String aKey, Object[] aArgs)` Logs an error message for a method, including the method name.

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

Constructor Detail

### MethodChecker

    public MethodChecker(AbstractJ2eeCheck aCheck)

  Constructs a `MethodChecker`.

  Parameters:
    `aCheck` - the client Check.

Method Detail

### getCheck

    protected AbstractJ2eeCheck getCheck()

  Gets the client Check.

  Returns:
    the client Check.

### checkMethods

    public void checkMethods(DetailAST aAST)

  Checks that the methods of a component satisfy requirements.

  Parameters:
    `aAST` - the AST for the component definition.

### checkMethod

    public abstract void checkMethod(DetailAST aMethodAST)

  Checks whether a method satisfies component requirements.

  Parameters:
    `aMethodAST` - the AST for the method definition.

### checkMethod

    public void checkMethod(DetailAST aMethodAST,
                            boolean aAllowFinal)

  Checks whether a method satisfies public, non-static, and final requirements.

  Parameters:
    `aMethodAST` - AST for the method definition.
    `aAllowFinal` - true if the method may be final.

### checkThrows

    protected void checkThrows(DetailAST aMethodAST,
                               String aException)

  Checks that the throws clause of a method definition includes an Exception.

  Parameters:
    `aMethodAST` - the AST for the method definition.
    `aException` - the name of the Exception to check.

### checkNotThrows

    protected void checkNotThrows(DetailAST aMethodAST,
                                  String aException)

  Checks that the throws clause of a method definition does no include an Exception.

  Parameters:
    `aMethodAST` - the AST for the method definition.
    `aException` - the name of the Exception to check.

### log

    protected void log(DetailAST aMethodAST,
                       String aKey,
                       Object[] aArgs)

  Logs an error message for a method.

  Parameters:
    `aMethodAST` - the AST for the method definition.
    `aKey` - key for message.
    `aArgs` - message arguments.

### logName

    protected void logName(DetailAST aMethodAST,
                           String aKey,
                           Object[] aArgs)

  Logs an error message for a method, including the method name.

  Parameters:
    `aMethodAST` - the AST for the method definition.
    `aKey` - key for message.
    `aArgs` - message arguments.

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