code: private List<String> getNamespaceMapping(Class<?> clazz) {
          int bestScore = 0;
          String bestNamespace = clazz.getName().replaceAll("\\.", "::");
          for (Namespace namespace : mappings.getNamespaces()) {
              if (namespace.getJavaPackage().length() > bestScore && clazz.getName().matches(namespace.getJavaPackage())) {
                  bestScore = namespace.getJavaPackage().length();
                  bestNamespace = Utils.isNullOrEmpty(namespace.getNamespace()) ? clazz.getSimpleName() : String.format("%s::%s", namespace.getNamespace(),
                          clazz.getSimpleName());
              }
          }
          return Arrays.asList(bestNamespace.split("::"));
      }
docs: Transform the full qualified name of {@code clazz} by applying the rules
  on namespace/package mappings. The mappings on the class name is not
  applied here. Does not work on inner class.
  
  @param clazz
  the class to get namespace from.
  @return the associate namespace associate to {@code clazz}.