Package org.sonar.java
Interface JavaVersionAwareVisitor
-
@Beta public interface JavaVersionAwareVisitor
Implementing this interface allows a check to be executed - or not - during analysis, depending of expected java version.
In order to be taken into account during analysis, the propertysonar.java.source
must be set.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isCompatibleWithJavaVersion(JavaVersion version)
Control if the check is compatible with the java version of the project being analyzed.
-
-
-
Method Detail
-
isCompatibleWithJavaVersion
boolean isCompatibleWithJavaVersion(JavaVersion version)
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.).- 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.
-
-