code: static Object getInMessage(PMessage message, final String key, Object defValue)
              throws ProvidenceConfigException {
          String sub = key;
          String name;
  
          PMessageDescriptor descriptor = message.descriptor();
          while (sub.contains(".")) {
              int idx = sub.indexOf(".");
  
              name = sub.substring(0, idx);
              sub = sub.substring(idx + 1);
  
              PField field = descriptor.findFieldByName(name);
              if (field == null) {
                  throw new ProvidenceConfigException("Message " + descriptor.getQualifiedName() + " has no field named " + name);
              }
  
              PDescriptor fieldDesc = field.getDescriptor();
              if (fieldDesc.getType() != PType.MESSAGE) {
                  throw new ProvidenceConfigException("Field '" + name + "' is not of message type in " + descriptor.getQualifiedName());
              }
              descriptor = (PMessageDescriptor) fieldDesc;
  
              if (message != null) {
                  message = (PMessage) message.get(field.getId());
              }
          }
  
          PField field = descriptor.findFieldByName(sub);
          if (field == null) {
              throw new ProvidenceConfigException("Message " + descriptor.getQualifiedName() + " has no field named " + sub);
          }
  
          if (message == null || !message.has(field.getId())) {
              return asType(field.getDescriptor(), defValue);
          }
  
          return message.get(field.getId());
      }
docs: Look up a key in the message structure. If the key is not found, return
  the default value. Note that the default value will be converted to the
  type of the declared field, not returned verbatim.
  
  @param message The message to look up into.
  @param key The key to look up.
  @param defValue The default value.
  @return The value found or the default.
  @throws ProvidenceConfigException When unable to get value from message.