jersey2-guice-impl/src/main/java/com/squarespace/jersey2/guice/BindingUtils.java
public static <T> Set<Annotation> getQualifiers(Key<T> key) {
    Annotation annotation = key.getAnnotation();
    if (annotation != null) {
      
      // Replace 'com.google.inject.name.Named' with 'javax.inject.Named' 
      if (annotation instanceof com.google.inject.name.Named) {
        annotation = toThreeThirtyNamed((com.google.inject.name.Named)annotation);
      }
      
      Class<? extends Annotation> type = annotation.annotationType();
      if (type.isAnnotationPresent(Qualifier.class)) {
        return Collections.singleton(annotation);
      }
      
      return Collections.<Annotation>singleton(new GuiceQualifier<>(key));
    }
    
    Class<? extends Annotation> annotationType = key.getAnnotationType();
    if (annotationType != null) {
      return Collections.<Annotation>singleton(new GuiceQualifier<>(key));
    }
    
    return Collections.emptySet();
  }
public static <T> Set<Annotation> getQualifiers(Key<T> key) {
    Annotation annotation = key.getAnnotation();
    if (annotation != null) {
      
      // Replace 'com.google.inject.name.Named' with 'javax.inject.Named' 
      if (annotation instanceof com.google.inject.name.Named) {
        annotation = toThreeThirtyNamed((com.google.inject.name.Named)annotation);
      }
      
      Class<? extends Annotation> type = annotation.annotationType();
      if (type.isAnnotationPresent(Qualifier.class)) {
        return Collections.singleton(annotation);
      }
      
      return Collections.<Annotation>singleton(new GuiceQualifier<>(key));
    }
    
    Class<? extends Annotation> annotationType = key.getAnnotationType();
    if (annotationType != null) {
      return Collections.<Annotation>singleton(new GuiceQualifier<>(key));
    }
    
    return Collections.emptySet();
  }
public static < T > Set < Annotation > getQualifiers ( Key < T > key ) { Annotation annotation = key . getAnnotation ( ) ; if ( annotation != null ) { // Replace 'com.google.inject.name.Named' with 'javax.inject.Named'  if ( annotation instanceof com . google . inject . name . Named ) { annotation = toThreeThirtyNamed ( ( com . google . inject . name . Named ) annotation ) ; } Class < ? extends Annotation > type = annotation . annotationType ( ) ; if ( type . isAnnotationPresent ( Qualifier . class ) ) { return Collections . singleton ( annotation ) ; } return Collections . < Annotation > singleton ( new GuiceQualifier <> ( key ) ) ; } Class < ? extends Annotation > annotationType = key . getAnnotationType ( ) ; if ( annotationType != null ) { return Collections . < Annotation > singleton ( new GuiceQualifier <> ( key ) ) ; } return Collections . emptySet ( ) ; }
Returns a {@link Set} of qualifier {@link Annotation}s for
the given {@link Key}.

NOTE: The {@link Set} will be either empty or will have
at most one {@link Annotation} in it.
Returns a { @link Set } of qualifier { @link Annotation } s for the given { @link Key } .