code: public <T> T parse(CharSequence text, TemporalQuery<T> query) {
          Objects.requireNonNull(text, "text");
          Objects.requireNonNull(query, "query");
          try {
              return parseResolved0(text, null).query(query);
          } catch (DateTimeParseException ex) {
              throw ex;
          } catch (RuntimeException ex) {
              throw createError(text, ex);
          }
      }
docs: Fully parses the text producing an object of the specified type.
  <p>
  Most applications should use this method for parsing.
  It parses the entire text to produce the required date-time.
  The query is typically a method reference to a {@code from(TemporalAccessor)} method.
  For example:
  <pre>
  LocalDateTime dt = parser.parse(str, LocalDateTime::from);
  </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 <T> the type of the parsed date-time
  @param text  the text to parse, not null
  @param query  the query defining the type to parse to, not null
  @return the parsed date-time, not null
  @throws DateTimeParseException if unable to parse the requested result