Class BatchSQLStatementsCheck
java.lang.Object
org.sonar.java.ast.visitors.SubscriptionVisitor
org.sonar.plugins.java.api.IssuableSubscriptionVisitor
org.sonar.java.checks.methods.AbstractMethodDetection
org.sonar.java.checks.BatchSQLStatementsCheck
- All Implemented Interfaces:
JavaCheck, JavaFileScanner
The rule checks for the use of "execute", "executeQuery" and "executeUpdate" methods
on a Statement inside a loop or a "forEach" on Iterables, Maps and Streams.
-
Field Summary
Fields inherited from class SubscriptionVisitor
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MethodMatchersvoidleaveFile(JavaFileScannerContext context) protected voidvoidsetContext(JavaFileScannerContext context) Methods inherited from class AbstractMethodDetection
nodesToVisit, onConstructorFound, onMethodReferenceFound, visitNodeMethods inherited from class IssuableSubscriptionVisitor
addIssue, addIssueOnFile, reportIssue, reportIssue, reportIssue, reportIssue, scanFile, scanTreeMethods inherited from class SubscriptionVisitor
leaveNode, visitToken, visitTriviaMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface JavaFileScanner
scanWithoutParsing
-
Constructor Details
-
BatchSQLStatementsCheck
public BatchSQLStatementsCheck()
-
-
Method Details
-
setContext
- Overrides:
setContextin classIssuableSubscriptionVisitor
-
leaveFile
- Overrides:
leaveFilein classIssuableSubscriptionVisitor
-
getMethodInvocationMatchers
- Specified by:
getMethodInvocationMatchersin classAbstractMethodDetection
-
onMethodInvocationFound
- Overrides:
onMethodInvocationFoundin classAbstractMethodDetection
-