net.sourceforge.pmd.typeresolution.rules

Class SignatureDeclareThrowsException

public class SignatureDeclareThrowsException extends AbstractJavaRule

A method/constructor shouldn't explicitly throw java.lang.Exception, since it is unclear which exceptions that can be thrown from the methods. It might be difficult to document and understand the vague interfaces. Use either a class derived from RuntimeException or a checked exception. This version uses PMD's type resolution facilities, and can detect if the class implements or extends TestCase class

Author: Trond Andersen acaplan Wouter Zelle

Method Summary
Objectvisit(ASTClassOrInterfaceDeclaration node, Object data)
Objectvisit(ASTImportDeclaration node, Object o)
Objectvisit(ASTMethodDeclaration methodDeclaration, Object o)
Objectvisit(ASTConstructorDeclaration constructorDeclaration, Object o)

Method Detail

visit

public Object visit(ASTClassOrInterfaceDeclaration node, Object data)

visit

public Object visit(ASTImportDeclaration node, Object o)

visit

public Object visit(ASTMethodDeclaration methodDeclaration, Object o)

visit

public Object visit(ASTConstructorDeclaration constructorDeclaration, Object o)