Class AbstractSharedAstVisitorRule

    • Constructor Detail

      • AbstractSharedAstVisitorRule

        public AbstractSharedAstVisitorRule()
    • Method Detail

      • applyTo

        public void applyTo​(SourceCode sourceCode,
                            java.util.List<Violation> violations)
        Description copied from class: AbstractRule
        Apply this rule to the specified source and return a list of violations (or an empty List)
        Overrides:
        applyTo in class AbstractAstVisitorRule
        Parameters:
        sourceCode - - the source to apply this rule to
        violations - - the List of violations to which new violations from this rule are to be added
      • getAstVisitor

        protected AstVisitor getAstVisitor​(SourceCode sourceCode)
        Subclasses can override to provide an AstVisitor with SourceCode or AST-specific initialization.
      • removeSuppressedViolations

        private java.util.List<Violation> removeSuppressedViolations​(java.util.List<Violation> violations,
                                                                     SourceCode sourceCode)