Class UnnecessaryConstructorRule

  • All Implemented Interfaces:
    AstVisitor, JavaVisitor, Rule, PropertySource

    public class UnnecessaryConstructorRule
    extends net.sourceforge.pmd.lang.java.rule.internal.AbstractIgnoredAnnotationRule
    This rule detects when a constructor is not necessary; i.e., when there is only one constructor, it’s public, has an empty body, and takes no arguments.