code: 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;
    }
docs: 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()