View Javadoc

    1   /**
    2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
    3    */
    4   package net.sourceforge.pmd.lang.java.rule.codesize;
    5
    6   import net.sourceforge.pmd.lang.java.ast.ASTClassOrInterfaceDeclaration;
    7   import net.sourceforge.pmd.lang.java.rule.design.ExcessiveLengthRule;
    8
    9   /**
    10   * This rule detects when a class exceeds a certain
    11   * threshold.  i.e. if a class has more than 1000 lines
    12   * of code.
    13   */
    14  public class ExcessiveClassLengthRule extends ExcessiveLengthRule {
    15      public ExcessiveClassLengthRule() {
    16          super(ASTClassOrInterfaceDeclaration.class);
    17          setProperty(MINIMUM_DESCRIPTOR, 1000d);
    18      }
    19  }