code: public static Stack<String> reversePath(List<String> pathParts) {
          Stack<String> pathStack = new Stack<String>();
          if (pathParts != null) {
              // Needs first extra argument at top of the stack
              for (int i = pathParts.size() - 1;i >=0;i--) {
                  pathStack.push(pathParts.get(i));
              }
          }
          return pathStack;
      }
docs: Reverse path and return as a stack. First path element is on top
  of the stack.
  
  @param pathParts path to reverse
  @return reversed path or an empty stack if no path parts are given. Never return null.