net.sourceforge.pmd.typeresolution.rules

Class CloneMethodMustImplementCloneable

public class CloneMethodMustImplementCloneable extends AbstractRule

The method clone() should only be implemented if the class implements the Cloneable interface with the exception of a final method that only throws CloneNotSupportedException. This version uses PMD's type resolution facilities, and can detect if the class implements or extends a Cloneable class

Author: acaplan

Method Summary
Objectvisit(ASTClassOrInterfaceDeclaration node, Object data)
Objectvisit(ASTMethodDeclaration node, Object data)
Objectvisit(ASTMethodDeclarator node, Object data)

Method Detail

visit

public Object visit(ASTClassOrInterfaceDeclaration node, Object data)

visit

public Object visit(ASTMethodDeclaration node, Object data)

visit

public Object visit(ASTMethodDeclarator node, Object data)