code: public List<String> getNamespace(Class<?> clazz) {
          List<String> namespace;
          if (clazz.getEnclosingClass() == null) {
              namespace = getNamespaceMapping(clazz);
          } else {
              Class<?> enclosing = clazz;
              Deque<Class<?>> stack = new ArrayDeque<Class<?>>();
              while (enclosing.getEnclosingClass() != null) {
                  stack.add(enclosing);
                  enclosing = enclosing.getEnclosingClass();
              }
              namespace = getNamespace(enclosing);
              while (!stack.isEmpty()) {
                  namespace.add(getCppName(stack.pollLast()));
              }
          }
          List<String> escapedNamespace = newArrayList();
          for (String name : namespace) {
              escapedNamespace.add(escapeName(name));
          }
          escapedNamespace.set(escapedNamespace.size() - 1, getCppName(clazz));
          return escapedNamespace;
      }
docs: Return the final full qualified C++ name of the class. Apply the
  namespace/package mapping, the class name mapping and escape all part by
  the reserved words list. Works also for inner class.
  
  @return the final full qualified C++ name.