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.ASTMethodDeclaration; 7 import net.sourceforge.pmd.lang.java.rule.design.ExcessiveLengthRule; 8 9 /** 10 * This rule detects when a method exceeds a certain 11 * threshold. i.e. if a method has more than x lines 12 * of code. 13 */ 14 public class ExcessiveMethodLengthRule extends ExcessiveLengthRule { 15 public ExcessiveMethodLengthRule() { 16 super(ASTMethodDeclaration.class); 17 setProperty(MINIMUM_DESCRIPTOR, 100d); 18 } 19 }