Class AbstractClassCouplingCheck

    • Constructor Detail

      • AbstractClassCouplingCheck

        protected AbstractClassCouplingCheck​(int defaultMax)
        Creates new instance of the check.
        Parameters:
        defaultMax - default value for allowed complexity.
    • Method Detail

      • getLogMessageId

        protected abstract String getLogMessageId()
        Returns message key we use for log violations.
        Returns:
        message key we use for log violations.
      • getMax

        public final int getMax()
        Returns allowed complexity.
        Returns:
        allowed complexity.
      • setMax

        public final void setMax​(int max)
        Sets maximum allowed complexity.
        Parameters:
        max - allowed complexity.
      • setExcludedClasses

        public final void setExcludedClasses​(String... excludedClasses)
        Sets user-excluded classes to ignore.
        Parameters:
        excludedClasses - the list of classes to ignore.
      • setExcludeClassesRegexps

        public void setExcludeClassesRegexps​(String... from)
        Sets user-excluded regular expression of classes to ignore.
        Parameters:
        from - array representing regular expressions of classes to ignore.
      • setExcludedPackages

        public final void setExcludedPackages​(String... excludedPackages)
        Sets user-excluded pakcages to ignore. All exlcuded packages should end with a period, so it also appends a dot to a package name.
        Parameters:
        excludedPackages - the list of packages to ignore.
      • beginTree

        public final void beginTree​(DetailAST ast)
        Description copied from class: AbstractCheck
        Called before the starting to process a tree. Ideal place to initialize information that is to be collected whilst processing a tree.
        Overrides:
        beginTree in class AbstractCheck
        Parameters:
        ast - the root of the tree