Package org.sonar.java.se.checks
Class MapComputeIfAbsentOrPresentCheck
- java.lang.Object
-
- org.sonar.java.se.checks.SECheck
-
- org.sonar.java.se.checks.MapComputeIfAbsentOrPresentCheck
-
- All Implemented Interfaces:
JavaVersionAwareVisitor
,JavaCheck
,JavaFileScanner
public class MapComputeIfAbsentOrPresentCheck extends SECheck implements JavaVersionAwareVisitor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.sonar.java.se.checks.SECheck
SECheck.SEIssue
-
-
Constructor Summary
Constructors Constructor Description MapComputeIfAbsentOrPresentCheck()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkEndOfExecution(CheckerContext context)
ProgramState
checkPostStatement(CheckerContext context, Tree syntaxNode)
ProgramState
checkPreStatement(CheckerContext context, Tree syntaxNode)
void
init(MethodTree methodTree, CFG cfg)
boolean
isCompatibleWithJavaVersion(JavaVersion version)
Control if the check is compatible with the java version of the project being analyzed.-
Methods inherited from class org.sonar.java.se.checks.SECheck
checkEndOfExecutionPath, interruptedExecution, reportIssue, reportIssue, scanFile
-
-
-
-
Method Detail
-
isCompatibleWithJavaVersion
public boolean isCompatibleWithJavaVersion(JavaVersion version)
Description copied from interface:JavaVersionAwareVisitor
Control if the check is compatible with the java version of the project being analyzed. The version used as parameter depends of the propertysonar.java.source
(6 or 1.6 for java 1.6, 7 or 1.7, etc.).- Specified by:
isCompatibleWithJavaVersion
in interfaceJavaVersionAwareVisitor
- Parameters:
version
- The java version of the sources- Returns:
- true if the check is compatible with detected java version and should be executed on sources, false otherwise.
-
init
public void init(MethodTree methodTree, CFG cfg)
-
checkPostStatement
public ProgramState checkPostStatement(CheckerContext context, Tree syntaxNode)
- Overrides:
checkPostStatement
in classSECheck
-
checkPreStatement
public ProgramState checkPreStatement(CheckerContext context, Tree syntaxNode)
- Overrides:
checkPreStatement
in classSECheck
-
checkEndOfExecution
public void checkEndOfExecution(CheckerContext context)
- Overrides:
checkEndOfExecution
in classSECheck
-
-