docs: public static TypeDeclaration getTypeDeclaration(CompilationUnit compilationUnit, String typeName)
              throws TypeDeclarationNotFoundException {
          requireNonNull(compilationUnit, "compilation unit");
          requireNonNull(typeName, "class name");
  
          int index = typeName.lastIndexOf('.');
          String packageName = index > 0 ? typeName.substring(0, index) : "";
          if (!matchesPackage(compilationUnit.getPackage(), packageName)) {
              throw new TypeDeclarationNotFoundException(compilationUnit, typeName, "The package '" + packageName
                      + "' doesn't match the package of the compilation unit.");
          }
  
          TypeDeclaration type = searchTypeDeclaration(compilationUnit.types(), typeName.substring(index + 1));
          if (type == null) {
              throw new TypeDeclarationNotFoundException(compilationUnit, typeName);
          }
          return type;
      }