Class MatcherAction

    • Field Detail

      • matcher

        protected Matcher matcher
      • mustHaveMatches

        protected boolean mustHaveMatches
    • Constructor Detail

      • MatcherAction

        public MatcherAction()
    • Method Detail

      • destroy

        public void destroy()
      • setVerbose

        public void setVerbose​(boolean newVerbose,
                               boolean temporary)
      • getMatchExpression

        public String getMatchExpression()
      • initialize

        public long initialize()
      • parseWalkerExpression

        protected abstract org.antlr.v4.runtime.ParserRuleContext parseWalkerExpression​(UserAgentTreeWalkerParser parser)
      • setFixedValue

        protected abstract void setFixedValue​(String newFixedValue)
      • inform

        public void inform​(String key,
                           String value,
                           org.antlr.v4.runtime.tree.ParseTree result)
        For each key that this action wants to be notified for this method is called. Note that on a single parse event the same name CAN be called multiple times!!
        Parameters:
        key - The key of the node
        value - The value that was found
        result - The node in the parser tree where the match occurred
      • obtainResult

        public abstract boolean obtainResult()
        Called after all nodes have been notified.
        Returns:
        true if the obtainResult result was valid. False will fail the entire matcher this belongs to.
      • reset

        public void reset()