Class AntlrBaseRule

    • Constructor Detail

      • AntlrBaseRule

        protected AntlrBaseRule()
    • Method Detail

      • apply

        public void apply​(Node target,
                          RuleContext ctx)
        Description copied from interface: Rule
        Process the given node. The nodes that are fed to this method are the nodes selected by Rule.getTargetSelector().
        Parameters:
        target - Node on which to apply the rule
        ctx - Rule context, handling violations
      • buildVisitor

        public abstract AstVisitor<RuleContext,​?> buildVisitor()
        Returns a rule visitor that can visit nodes for the given rule context. This visitor should explore the nodes it's interested in and report violations on the given rule context.
        Returns:
        A visitor bound to the given rule context