code: public static Deque<String> createScopeLookupList(UserTypeContainer container) {
          String namespace = container.getNamespace();
          Deque<String> scopeLookupList = new ArrayDeque<>();
          int end = 0;
          while (end >= 0) {
              end = namespace.indexOf('.', end);
              if (end >= 0) {
                  end++;
                  String scope = namespace.substring(0, end);
                  scopeLookupList.addFirst(scope);
              }
          }
          return scopeLookupList;
      }
docs: Create a lookup list for reference resolution.
  
  <p>Type name resolution in the protocol buffer language works like C++: first
  the innermost scope is searched, then the next-innermost, and so on, with
  each package considered to be "inner" to its parent package.