code: public static void resolveKeyPath(KeyPath keyPath, int depth, List<KeyPath> accumulator,
        KeyPath currentPartialKeyPath, KeyPathElementContent content) {
      if (keyPath.fullyResolvesTo(content.getName(), depth)) {
        currentPartialKeyPath = currentPartialKeyPath.addKey(content.getName());
        accumulator.add(currentPartialKeyPath.resolve(content));
      }
    }
docs: Helper method for any {@link KeyPathElementContent} that will check if the content
  fully matches the keypath then will add itself as the final key, resolve it, and add
  it to the accumulator list.
  
  Any {@link KeyPathElementContent} should call through to this as its implementation of
  {@link KeyPathElementContent#resolveKeyPath(KeyPath, int, List, KeyPath)}.