code: public TemporalAccessor parseBest(CharSequence text, TemporalQuery<?>... types) {
          Jdk8Methods.requireNonNull(text, "text");
          Jdk8Methods.requireNonNull(types, "types");
          if (types.length < 2) {
              throw new IllegalArgumentException("At least two types must be specified");
          }
          try {
              DateTimeBuilder builder = parseToBuilder(text, null).resolve(resolverStyle, resolverFields);
              for (TemporalQuery<?> type : types) {
                  try {
                      return (TemporalAccessor) builder.build(type);
                  } catch (RuntimeException ex) {
                      // continue
                  }
              }
              throw new DateTimeException("Unable to convert parsed text to any specified type: " + Arrays.toString(types));
          } catch (DateTimeParseException ex) {
              throw ex;
          } catch (RuntimeException ex) {
              throw createError(text, ex);
          }
      }
docs: Fully parses the text producing an object of one of the specified types.
  <p>
  This parse method is convenient for use when the parser can handle optional elements.
  For example, a pattern of 'yyyy[-MM[-dd]]' can be fully parsed to a {@code LocalDate},
  or partially parsed to a {@code YearMonth} or a {@code Year}.
  The types must be specified in order, starting from the best matching full-parse option
  and ending with the worst matching minimal parse option.
  <p>
  The result is associated with the first type that successfully parses.
  Normally, applications will use {@code instanceof} to check the result.
  For example:
  <pre>
  TemporalAccessor dt = parser.parseBest(str, LocalDate.FROM, YearMonth.FROM);
  if (dt instanceof LocalDate) {
  ...
  } else {
  ...
  }
  </pre>
  If the parse completes without reading the entire length of the text,
  or a problem occurs during parsing or merging, then an exception is thrown.
  
  @param text  the text to parse, not null
  @param types  the types to attempt to parse to, which must implement {@code TemporalAccessor}, not null
  @return the parsed date-time, not null
  @throws IllegalArgumentException if less than 2 types are specified
  @throws DateTimeParseException if unable to parse the requested result