net.sourceforge.pmd.lang.java.rule.codesize

## Class NcssTypeCountRule

- java.lang.Object
- - net.sourceforge.pmd.AbstractPropertySource
  - - net.sourceforge.pmd.lang.rule.AbstractRule
    - - net.sourceforge.pmd.lang.java.rule.AbstractJavaRule
      - - net.sourceforge.pmd.lang.java.rule.AbstractStatisticalJavaRule
        - - net.sourceforge.pmd.lang.java.rule.codesize.AbstractNcssCountRule
          - - net.sourceforge.pmd.lang.java.rule.codesize.NcssTypeCountRule

- All Implemented Interfaces:
    JavaParserVisitor, ImmutableLanguage, StatisticalRule, PropertySource, Rule

      public class NcssTypeCountRule
      extends AbstractNcssCountRule

  Non-commented source statement counter for type declarations.
  Author:
    Jason Bennett

- - ### Field Summary

    - ### Fields inherited from class net.sourceforge.pmd.AbstractPropertySource

      `propertyDescriptors, propertyValuesByDescriptor`

    - ### Fields inherited from interface net.sourceforge.pmd.lang.rule.stat.StatisticalRule

      `MINIMUM_DESCRIPTOR, SIGMA_DESCRIPTOR, TOP_SCORE_DESCRIPTOR`

    - ### Fields inherited from interface net.sourceforge.pmd.Rule

      `VIOLATION_SUPPRESS_REGEX_DESCRIPTOR, VIOLATION_SUPPRESS_XPATH_DESCRIPTOR`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NcssTypeCountRule()` Count type declarations.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object[]` | `getViolationParameters(DataPoint point)`
    `Object` | `visit(ASTClassOrInterfaceDeclaration node, Object data)`
    `Object` | `visit(ASTConstructorDeclaration node, Object data)`
    `Object` | `visit(ASTEnumDeclaration node, Object data)`
    `Object` | `visit(ASTExplicitConstructorInvocation node, Object data)`
    `Object` | `visit(ASTFieldDeclaration node, Object data)`
    `Object` | `visit(ASTInitializer node, Object data)`
    `Object` | `visit(ASTMethodDeclaration node, Object data)`

    - ### Methods inherited from class net.sourceforge.pmd.lang.java.rule.codesize.AbstractNcssCountRule

      `countNodeChildren, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit`

    - ### Methods inherited from class net.sourceforge.pmd.lang.java.rule.AbstractStatisticalJavaRule

      `addDataPoint, apply`

    - ### Methods inherited from class net.sourceforge.pmd.lang.java.rule.AbstractJavaRule

      `getDeclaringType, importsPackage, isQualifiedName, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitAll`

    - ### Methods inherited from class net.sourceforge.pmd.lang.rule.AbstractRule

      `addExample, addRuleChainVisit, addRuleChainVisit, addViolation, addViolation, addViolation, addViolationWithMessage, addViolationWithMessage, addViolationWithMessage, deepCopyValuesTo, end, equals, getDescription, getExamples, getExternalInfoUrl, getLanguage, getMaximumLanguageVersion, getMessage, getMinimumLanguageVersion, getName, getParserOptions, getPriority, getRuleChainVisits, getRuleClass, getRuleSetName, getSince, hashCode, isDeprecated, setDeprecated, setDescription, setExternalInfoUrl, setLanguage, setMaximumLanguageVersion, setMessage, setMinimumLanguageVersion, setName, setPriority, setRuleClass, setRuleSetName, setSince, setUsesDFA, setUsesTypeResolution, start, usesDFA, usesRuleChain, usesTypeResolution`

    - ### Methods inherited from class net.sourceforge.pmd.AbstractPropertySource

      `copyPropertyDescriptors, copyPropertyValues, definePropertyDescriptor, dysfunctionReason, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, useDefaultValueFor, usesDefaultValues`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface net.sourceforge.pmd.Rule

      `addExample, addRuleChainVisit, addRuleChainVisit, end, getDescription, getExamples, getExternalInfoUrl, getLanguage, getMaximumLanguageVersion, getMessage, getMinimumLanguageVersion, getName, getParserOptions, getPriority, getRuleChainVisits, getRuleClass, getRuleSetName, getSince, isDeprecated, setDeprecated, setDescription, setExternalInfoUrl, setLanguage, setMaximumLanguageVersion, setMessage, setMinimumLanguageVersion, setName, setPriority, setRuleClass, setRuleSetName, setSince, setUsesDFA, setUsesTypeResolution, start, usesDFA, usesRuleChain, usesTypeResolution`

    - ### Methods inherited from interface net.sourceforge.pmd.PropertySource

      `definePropertyDescriptor, dysfunctionReason, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, useDefaultValueFor, usesDefaultValues`

- - ### Constructor Detail

    - #### NcssTypeCountRule

          public NcssTypeCountRule()

      Count type declarations. This includes classes as well as enums and annotations.

  - ### Method Detail

    - #### visit

          public Object visit(ASTClassOrInterfaceDeclaration node,
                     Object data)

      Specified by:
        `visit` in interface `JavaParserVisitor`
      Overrides:
        `visit` in class `AbstractJavaRule`

    - #### visit

          public Object visit(ASTConstructorDeclaration node,
                     Object data)

      Specified by:
        `visit` in interface `JavaParserVisitor`
      Overrides:
        `visit` in class `AbstractJavaRule`

    - #### visit

          public Object visit(ASTExplicitConstructorInvocation node,
                     Object data)

      Specified by:
        `visit` in interface `JavaParserVisitor`
      Overrides:
        `visit` in class `AbstractJavaRule`

    - #### visit

          public Object visit(ASTEnumDeclaration node,
                     Object data)

      Specified by:
        `visit` in interface `JavaParserVisitor`
      Overrides:
        `visit` in class `AbstractJavaRule`

    - #### visit

          public Object visit(ASTMethodDeclaration node,
                     Object data)

      Specified by:
        `visit` in interface `JavaParserVisitor`
      Overrides:
        `visit` in class `AbstractJavaRule`

    - #### visit

          public Object visit(ASTInitializer node,
                     Object data)

      Specified by:
        `visit` in interface `JavaParserVisitor`
      Overrides:
        `visit` in class `AbstractJavaRule`

    - #### visit

          public Object visit(ASTFieldDeclaration node,
                     Object data)

      Specified by:
        `visit` in interface `JavaParserVisitor`
      Overrides:
        `visit` in class `AbstractJavaRule`

    - #### getViolationParameters

          public Object[] getViolationParameters(DataPoint point)

      Specified by:
        `getViolationParameters` in interface `StatisticalRule`
      Overrides:
        `getViolationParameters` in class `AbstractStatisticalJavaRule`

Copyright © 2002-2013 InfoEther. All Rights Reserved.