use of org.sonar.api.batch.Phase in project sonarlint-core by SonarSource.
the class ScannerExtensionDictionnary method evaluatePhase.
private static Phase.Name evaluatePhase(Object extension) {
Object extensionToEvaluate;
if (extension instanceof SensorWrapper) {
extensionToEvaluate = ((SensorWrapper) extension).wrappedSensor();
} else {
extensionToEvaluate = extension;
}
Phase phaseAnnotation = AnnotationUtils.getAnnotation(extensionToEvaluate, Phase.class);
if (phaseAnnotation != null) {
return phaseAnnotation.name();
}
return Phase.Name.DEFAULT;
}
use of org.sonar.api.batch.Phase in project sonarqube by SonarSource.
the class ScannerExtensionDictionnary method evaluatePhase.
private static Phase.Name evaluatePhase(Object extension) {
Object extensionToEvaluate;
if (extension instanceof SensorWrapper) {
extensionToEvaluate = ((SensorWrapper) extension).wrappedSensor();
} else {
extensionToEvaluate = extension;
}
Phase phaseAnnotation = AnnotationUtils.getAnnotation(extensionToEvaluate, Phase.class);
if (phaseAnnotation != null) {
return phaseAnnotation.name();
}
return Phase.Name.DEFAULT;
}
Aggregations