Class AbstractAstVisitorRule

    • Constructor Detail

      • AbstractAstVisitorRule

        public AbstractAstVisitorRule()
    • Method Detail

      • getAstVisitorClass

        protected Class getAstVisitorClass()
        Each concrete subclass must either set this property or define its own property with the same name
      • getAstVisitor

        public AstVisitor getAstVisitor()
      • applyTo

        public void applyTo​(SourceCode sourceCode,
                            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)
        Specified by:
        applyTo in class AbstractRule
        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
      • shouldApplyThisRuleTo

        protected boolean shouldApplyThisRuleTo​(org.codehaus.groovy.ast.ClassNode classNode)
        Return true if this rule should be applied for the specified ClassNode, based on the configuration of this rule.
        Parameters:
        classNode - - the ClassNode
        Returns:
        true if this rule should be applied for the specified ClassNode
      • getApplyToClassNames

        public String getApplyToClassNames()
      • setApplyToClassNames

        public void setApplyToClassNames​(String applyToClassNames)
      • getDoNotApplyToClassNames

        public String getDoNotApplyToClassNames()
      • setDoNotApplyToClassNames

        public void setDoNotApplyToClassNames​(String doNotApplyToClassNames)