Documentation
¶
Index ¶
- func MatchesEntityPath(target ModuleTarget, entPath string) bool
- func ResolveImport(spec string, knownFiles map[string]bool) string
- func ResolvePackageDir(spec, rootDir string) (string, error)
- func ResolveTypeFile(spec string, knownFiles map[string]bool) (string, bool)
- type ModuleTarget
- type SymbolTarget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchesEntityPath ¶
func MatchesEntityPath(target ModuleTarget, entPath string) bool
MatchesEntityPath reports whether entPath (relative to target.Dir) belongs to target.
func ResolveImport ¶
ResolveImport maps a Java type/package spec to a path: or java: reference. knownFiles keys are slash-separated paths relative to the ingest root.
func ResolvePackageDir ¶
ResolvePackageDir resolves java:<package> to a filesystem directory under rootDir using package-path mapping and common source roots (src/main/java, src/test/java, src).
Types ¶
type ModuleTarget ¶
type ModuleTarget struct {
Dir string
File string // basename when the target is a single .java file
}
ModuleTarget is a resolved package or compilation unit on disk.
func ResolveModuleTarget ¶
func ResolveModuleTarget(spec, rootDir string) (ModuleTarget, error)
ResolveModuleTarget resolves java:<spec> to a package dir and optional file.
type SymbolTarget ¶
SymbolTarget points at a directory to ingest for a java: type reference.
func ResolveSymbolTarget ¶
func ResolveSymbolTarget(spec, symbol, rootDir string) (SymbolTarget, bool, error)
ResolveSymbolTarget resolves java:<type-or-package>::<symbol>.