code: public static List<Object> getValuesForPath(Object baseObject, String[] pathComponents) {
  
          List<Object> currentList = Lists.newArrayList();
          currentList.add(baseObject);
          for (String pathComponent : pathComponents) {
              List<Object> newList = Lists.newArrayList();
              for (Object element : currentList) {
                  newList.addAll(getValuesForPathComponent(element, pathComponent));
              }
              currentList = newList;
          }
          return currentList;
      }
docs: Gets the list of values reachable from the given base object with the given path.<p>
  
  @param baseObject the base object (a CmsEntity or a string)
  @param pathComponents the path components
  @return the list of values for the given path (either of type String or CmsEntity)