code: public boolean isOptional(MemberLiteral<?, ?> member) {
      Inject annotation = member.getAnnotation(Inject.class);
      return annotation != null && annotation.optional();
    }
docs: Returns true if the passed method has an {@literal @}{@code Inject}
  annotation and the injection is marked as optional (
  {@literal @}{@code Inject(optional = true)}).
  
  Note that {@link javax.inject.Inject} does not have an optional parameter
  and therefore cannot be optional.
  
  @param member method to be checked
  @return true if method is injected optionally