Class PrematureDeclarationRule

java.lang.Object
net.sourceforge.pmd.properties.AbstractPropertySource
net.sourceforge.pmd.lang.rule.AbstractRule
All Implemented Interfaces:
net.sourceforge.pmd.lang.ast.AstVisitor, JavaVisitor, net.sourceforge.pmd.lang.rule.Rule, net.sourceforge.pmd.properties.PropertySource

public class PrematureDeclarationRule extends AbstractJavaRulechainRule
Checks for variables in methods that are defined before they are really needed. A reference is deemed to be premature if it is created ahead of a block of code that doesn't use it that also has the ability to return or throw an exception.
Author:
Brian Remedios