Class ExcessiveNodeCountRule

  • All Implemented Interfaces:
    PLSQLParserVisitor, net.sourceforge.pmd.lang.rule.ImmutableLanguage, net.sourceforge.pmd.lang.rule.stat.StatisticalRule, net.sourceforge.pmd.properties.PropertySource, net.sourceforge.pmd.Rule
    Direct Known Subclasses:
    ExcessiveParameterListRule

    public class ExcessiveNodeCountRule
    extends AbstractStatisticalPLSQLRule
    This is a common super class for things which shouldn't have excessive nodes underneath.

    It expects all "visit" calls to return an Integer. It will sum all the values it gets, and use that as its score.

    To use it, override the "visit" for the nodes that need to be counted. On those return "new Integer(1)"

    All others will return 0 (or the sum of counted nodes underneath.)

    • Constructor Detail

      • ExcessiveNodeCountRule

        public ExcessiveNodeCountRule​(java.lang.Class<?> nodeClass)