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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
For each key that this action wants to be notified for this method is called.void
inform
(String key, WalkList.WalkResult foundValue) long
boolean
Called after all nodes have been notified.protected org.antlr.v4.runtime.ParserRuleContext
void
reset()
protected void
setFixedValue
(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:
parseWalkerExpression
in classMatcherAction
-
initialize
public long initialize()- Overrides:
initialize
in classMatcherAction
-
setFixedValue
- Specified by:
setFixedValue
in classMatcherAction
-
inform
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 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:
inform
in classMatcherAction
-
obtainResult
public boolean obtainResult()Description copied from class:MatcherAction
Called after all nodes have been notified.- Specified by:
obtainResult
in classMatcherAction
- Returns:
- true if the obtainResult result was valid. False will fail the entire matcher this belongs to.
-
reset
public void reset()- Overrides:
reset
in classMatcherAction
-
toString
- Overrides:
toString
in classMatcherAction
-