code: public static void bindSpecificComponent(final AbstractBinder binder,
                                               final Injector injector,
                                               final Class<?> type,
                                               final Class<?> specificType,
                                               final boolean hkManaged,
                                               final boolean singleton) {
          // resolve generics of specific type
          final GenericsContext context = GenericsResolver.resolve(type).type(specificType);
          final List<Type> genericTypes = context.genericTypes();
          final Type[] generics = genericTypes.toArray(new Type[0]);
          final Type bindingType = generics.length > 0 ? new ParameterizedTypeImpl(specificType, generics)
                  : specificType;
          if (hkManaged) {
              optionalSingleton(
                      binder.bind(type).to(type).to(bindingType),
                      singleton);
          } else {
              optionalSingleton(
                      binder.bindFactory(new GuiceComponentFactory<>(injector, type)).to(type).to(bindingType),
                      singleton);
          }
      }
docs: Binds jersey specific component (component implements jersey interface or extends class).
  Specific binding is required for types directly supported by jersey (e.g. ExceptionMapper).
  Such types must be bound to target interface directly, otherwise jersey would not be able to resolve them.
  <p> If type is {@link HK2Managed}, binds directly.
  Otherwise, use guice "bridge" factory to lazily bind type.</p>
  
  @param binder       HK2 binder
  @param injector     guice injector
  @param type         type which implements specific jersey interface or extends class
  @param specificType specific jersey type (interface or abstract class)
  @param hkManaged    true if bean must be managed by HK2, false to bind guice managed instance
  @param singleton    true to force singleton scope