Class AbstractRedosCheck
- All Implemented Interfaces:
RegexCheck, JavaCheck, JavaFileScanner
- Direct Known Subclasses:
RedosCheck, SuperLinearRegexCheck
-
Nested Class Summary
Nested classes/interfaces inherited from interface RegexCheck
RegexCheck.RegexIssueLocation -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.sonar.java.checks.regex.AbstractRedosCheck.BacktrackingTypeprotected booleanFields inherited from class AbstractRegexCheck
JAVA_LANG_STRING, LANG3_REGEX_UTILS, METHODS_IMPLYING_DOT_ALL_FLAG, REGEX_METHODS, REGEX_ON_THE_SECOND_ARGUMENT_METHODSFields inherited from class SubscriptionVisitor
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckRegex(org.sonarsource.analyzer.commons.regex.RegexParseResult regexForLiterals, ExpressionTree methodInvocationOrAnnotation, org.sonarsource.analyzer.commons.regex.MatchType matchType) protected booleanMethods inherited from class AbstractRegexCheckTrackingMatchType
checkRegex, trackedMethodMatchersMethods inherited from class AbstractRegexCheckTrackingMatchers
checkRegex, leaveNode, nodesToVisit, onMethodInvocationFound, visitNodeMethods inherited from class AbstractRegexCheck
filterAnnotation, getFinalVariableInitializer, getFlagsTree, getLiterals, getMethodInvocationMatchers, getRegexLiteralExpression, methodOrAnnotationName, onAnnotationFound, regexForLiterals, reportIssue, reportIssue, reportIssueFromCommons, setContextMethods inherited from class IssuableSubscriptionVisitor
addIssue, addIssueOnFile, leaveFile, reportIssue, reportIssue, reportIssue, reportIssue, scanFile, scanTreeMethods inherited from class SubscriptionVisitor
visitToken, visitTriviaMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface JavaFileScanner
scanWithoutParsing
-
Field Details
-
regexContainsBackReference
protected boolean regexContainsBackReference -
foundBacktrackingType
protected org.sonar.java.checks.regex.AbstractRedosCheck.BacktrackingType foundBacktrackingType
-
-
Constructor Details
-
AbstractRedosCheck
public AbstractRedosCheck()
-
-
Method Details
-
isJava9OrHigher
protected boolean isJava9OrHigher() -
checkRegex
public void checkRegex(org.sonarsource.analyzer.commons.regex.RegexParseResult regexForLiterals, ExpressionTree methodInvocationOrAnnotation, org.sonarsource.analyzer.commons.regex.MatchType matchType) - Specified by:
checkRegexin classAbstractRegexCheckTrackingMatchType
-