Documentation
¶
Overview ¶
Package java implements the Java language extractor.
Mirrors src/main/java/.../intelligence/extractor/java/JavaLanguageExtractor.java but uses the tree-sitter Java grammar (already wired in internal/parser) instead of JavaParser. Capabilities:
- METHOD nodes: emit CALLS edges for method_invocation children of the matching method_declaration. Ambiguous-label callees (two distinct METHOD nodes share a label) are dropped — same false-positive guard as the Java side.
- CLASS / ABSTRACT_CLASS / INTERFACE nodes: emit type-hint properties `extends_type` and `implements_types` from the matching class/interface_declaration.
Confidence: PARTIAL — the tree-sitter resolver isn't a full Java type checker, so we tag every emitted fact PARTIAL. The Edge.Confidence field (typed) stays LEXICAL; the "confidence":"PARTIAL" string lives in Properties for parity with the Java side's edge.properties map.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extractor ¶
type Extractor struct{}
Extractor is the Java LanguageExtractor implementation. Stateless and safe for concurrent calls.
func (*Extractor) Extract ¶
Extract returns CALLS edges for METHOD nodes and type-hierarchy hints for CLASS / ABSTRACT_CLASS / INTERFACE nodes. Single-node convenience wrapper — parses once per call. Production paths use ExtractFromTree.
func (*Extractor) ExtractFromTree ¶
func (e *Extractor) ExtractFromTree(ctx extractor.Context, tree *parser.Tree, nodes []*model.CodeNode) []extractor.Result
ExtractFromTree walks the pre-parsed tree once per input node and returns one Result per node in matching order. tree may be nil — all results are EmptyResult in that case.