Interface JavaPackageFinder

    • Method Detail

      • findJavaPackageFolder

        Path findJavaPackageFolder​(Path pathRelativeToProjectRoot)
        Given the relative path to a file under the project root, return the Java package with which the file is associated. For .java files, this is generally obvious, as they contain an explicit "package" statement. For other files, such as resources, other heuristics must be used.
        pathRelativeToProjectRoot - may be a path to either a file or a directory. If a directory, then it must end in a slash.
        a path that always ends with a slash, or the empty string, indicating the root directory.
      • findJavaPackage

        String findJavaPackage​(Path pathRelativeToProjectRoot)