Noir::TreeSitterJavaDtoIndex
Builds the DTO field index for a given source file by combining:
- in-file class/interface declarations,
- every
.javain the same directory (same Java package), and - files reachable through the
importstatements, resolved against a source root inferred from the current file'spackage ...;declaration.
Each file's extraction is memoised so the per-file loop in
spring.cr doesn't re-read and re-parse DTOs over and over when
many controllers share the same package.
Constants
Backstop against pathological extends graphs — far above any
real DTO hierarchy depth/fan-out.
Constructors
Class methods
Instance methods
Build the DTO index visible to the Spring controller at path.
Callers pass content (already read once) to avoid a redundant
disk read for the current file. Cross-file traversal is
delegated to Noir::ImportGraph so this stays a thin
language-specific cache.
build_for_with_root(path, content, root) — same as
build_for but uses a pre-parsed root for the current file's
extractions (extract_package_name, extract_imports, the
current file's extract_class_fields). Sibling files still
parse independently — but sibling parses go through the
process-wide cache so concurrent analyzers don't double-up.