net.sourceforge.pmd.rules

Class ExcessivePublicCount

public class ExcessivePublicCount extends ExcessiveNodeCountRule

Author: aglover

Class Name: ExcessivePublicCount

Rule attempts to count all public methods and public attributes defined in a class.

If a class has a high number of public operations, it might be wise to consider whether it would be appropriate to divide it into subclasses.

A large proportion of public members and operations means the class has high potential to be affected by external classes. Futhermore, increased effort will be required to thoroughly test the class.

Constructor Summary
ExcessivePublicCount()
Method Summary
Objectvisit(ASTMethodDeclarator node, Object data)
Method counts ONLY public methods.
Objectvisit(ASTFieldDeclaration node, Object data)
Method counts ONLY public class attributes which are not PUBLIC and static- these usually represent constants....

Constructor Detail

ExcessivePublicCount

public ExcessivePublicCount()

Method Detail

visit

public Object visit(ASTMethodDeclarator node, Object data)
Method counts ONLY public methods.

visit

public Object visit(ASTFieldDeclaration node, Object data)
Method counts ONLY public class attributes which are not PUBLIC and static- these usually represent constants....