Class MatcherFailIfFoundAction
java.lang.Object
nl.basjes.parse.useragent.analyze.MatcherAction
nl.basjes.parse.useragent.analyze.MatcherFailIfFoundAction
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
Fields inherited from class nl.basjes.parse.useragent.analyze.MatcherAction
matcher, mustHaveMatches -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidFor each key that this action wants to be notified for this method is called.voidinform(String key, WalkList.WalkResult foundValue) longbooleanCalled after all nodes have been notified.protected org.antlr.v4.runtime.ParserRuleContextvoidreset()protected voidsetFixedValue(String fixedValue) toString()Methods inherited from class nl.basjes.parse.useragent.analyze.MatcherAction
destroy, getMatches, getMatchExpression, setVerbose
-
Constructor Details
-
MatcherFailIfFoundAction
-
-
Method Details
-
parseWalkerExpression
protected org.antlr.v4.runtime.ParserRuleContext parseWalkerExpression(UserAgentTreeWalkerParser parser) - Specified by:
parseWalkerExpressionin classMatcherAction
-
initialize
public long initialize()- Overrides:
initializein classMatcherAction
-
setFixedValue
- Specified by:
setFixedValuein classMatcherAction
-
inform
Description copied from class:MatcherActionFor 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:
informin classMatcherAction- Parameters:
key- The key of the nodevalue- The value that was foundresult- The node in the parser tree where the match occurred
-
inform
- Specified by:
informin classMatcherAction
-
obtainResult
public boolean obtainResult()Description copied from class:MatcherActionCalled after all nodes have been notified.- Specified by:
obtainResultin classMatcherAction- Returns:
- true if the obtainResult result was valid. False will fail the entire matcher this belongs to.
-
reset
public void reset()- Overrides:
resetin classMatcherAction
-
toString
- Overrides:
toStringin classMatcherAction
-