Examples of SupportedEnvironment


Examples of org.sonar.api.batch.SupportedEnvironment

  public static boolean isBatchExtension(Object extension) {
    return isType(extension, BatchExtension.class);
  }

  public static boolean supportsEnvironment(Object extension, EnvironmentInformation environment) {
    SupportedEnvironment env = AnnotationUtils.getAnnotation(extension, SupportedEnvironment.class);
    if (env == null) {
      return true;
    }
    for (String supported : env.value()) {
      if (StringUtils.equalsIgnoreCase(environment.getKey(), supported)) {
        return true;
      }
    }
    return false;
View Full Code Here

Examples of org.sonar.api.batch.SupportedEnvironment

  public static boolean supportsPreview(Object extension) {
    return AnnotationUtils.getAnnotation(extension, DryRunIncompatible.class) == null;
  }

  public static boolean isMavenExtensionOnly(Object extension) {
    SupportedEnvironment env = AnnotationUtils.getAnnotation(extension, SupportedEnvironment.class);
    return env != null && env.value().length == 1 && StringUtils.equalsIgnoreCase("maven", env.value()[0]);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.