Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 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]);
 }