jersey2-guice-impl/src/main/java/com/squarespace/jersey2/guice/BindingUtils.java
private static boolean isGuiceOptional(AnnotatedElement element) {
    com.google.inject.Inject inject = element.getAnnotation(com.google.inject.Inject.class);
    
    if (inject != null) {
      return inject.optional();
    }
    
    return false;
  }
private static boolean isGuiceOptional(AnnotatedElement element) {
    com.google.inject.Inject inject = element.getAnnotation(com.google.inject.Inject.class);
    
    if (inject != null) {
      return inject.optional();
    }
    
    return false;
  }
Returns {@code true} if the given {@link AnnotatedElement} has a
{@link com.google.inject.Inject} {@link Annotation} and it's marked
as being optional.

@see com.google.inject.Inject#optional()