Class NetBeansJavaQueryUtils

java.lang.Object
uno.anahata.ai.nb.util.NetBeansJavaQueryUtils

public class NetBeansJavaQueryUtils extends Object
  • Constructor Details

    • NetBeansJavaQueryUtils

      public NetBeansJavaQueryUtils()
  • Method Details

    • findSourceFile

      public static org.openide.filesystems.FileObject findSourceFile(String fqn) throws Exception
      Finds the FileObject corresponding to the source file for a given FQN. This is a low-level utility for bridging a class name to its source file.
      Parameters:
      fqn - The fully qualified class name.
      Returns:
      The FileObject of the source file, or null if not found.
      Throws:
      Exception - if an error occurs.
    • findClassFile

      public static ClassSearchResult findClassFile(String classAsPath)
      Finds the FileObject corresponding to the compiled class file for a given FQN. This is a low-level utility that searches all registered classpaths.
      Parameters:
      classAsPath - The path to the class file (e.g., java/lang/String.class).
      Returns:
      A ClassSearchResult containing the FileObject and its ClassPath, or null if not found.