code: @Override
      public Object parseObject(String source, ParsePosition pos) {
          if (!msgPattern.hasNamedArguments()) {
              return parse(source, pos);
          } else {
              return parseToMap(source, pos);
          }
      }
docs: Parses text from a string to produce an object array or Map.
  <p>
  The method attempts to parse text starting at the index given by
  <code>pos</code>.
  If parsing succeeds, then the index of <code>pos</code> is updated
  to the index after the last character used (parsing does not necessarily
  use all characters up to the end of the string), and the parsed
  object array is returned. The updated <code>pos</code> can be used to
  indicate the starting point for the next call to this method.
  If an error occurs, then the index of <code>pos</code> is not
  changed, the error index of <code>pos</code> is set to the index of
  the character where the error occurred, and null is returned.
  <p>
  See the {@link #parse(String, ParsePosition)} method for more information
  on message parsing.
  
  @param source A <code>String</code>, part of which should be parsed.
  @param pos A <code>ParsePosition</code> object with index and error
  index information as described above.
  @return An <code>Object</code> parsed from the string, either an
  array of Object, or a Map, depending on whether named
  arguments are used.  This can be queried using <code>usesNamedArguments</code>.
  In case of error, returns null.
  @throws NullPointerException if <code>pos</code> is null.