Class MatcherFailIfFoundAction

java.lang.Object
nl.basjes.parse.useragent.analyze.MatcherAction
nl.basjes.parse.useragent.analyze.MatcherFailIfFoundAction
All Implemented Interfaces:
Serializable

public class MatcherFailIfFoundAction extends MatcherAction
See Also:
  • Constructor Details

    • MatcherFailIfFoundAction

      public MatcherFailIfFoundAction(String config, Matcher matcher)
  • Method Details

    • parseWalkerExpression

      protected org.antlr.v4.runtime.ParserRuleContext parseWalkerExpression(UserAgentTreeWalkerParser parser)
      Specified by:
      parseWalkerExpression in class MatcherAction
    • initialize

      public long initialize()
      Overrides:
      initialize in class MatcherAction
    • setFixedValue

      protected void setFixedValue(String fixedValue)
      Specified by:
      setFixedValue in class MatcherAction
    • inform

      public void inform(String key, String value, org.antlr.v4.runtime.tree.ParseTree result)
      Description copied from class: MatcherAction
      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!!
      Overrides:
      inform in class MatcherAction
      Parameters:
      key - The key of the node
      value - The value that was found
      result - The node in the parser tree where the match occurred
    • inform

      public void inform(String key, WalkList.WalkResult foundValue)
      Specified by:
      inform in class MatcherAction
    • obtainResult

      public boolean obtainResult()
      Description copied from class: MatcherAction
      Called after all nodes have been notified.
      Specified by:
      obtainResult in class MatcherAction
      Returns:
      true if the obtainResult result was valid. False will fail the entire matcher this belongs to.
    • reset

      public void reset()
      Overrides:
      reset in class MatcherAction
    • toString

      public String toString()
      Overrides:
      toString in class MatcherAction