Documentation
¶
Overview ¶
Package javaextractor provides Java extraction with Spring annotation route detection.
Package javaextractor provides a tree-sitter based extractor for Java files. It implements types.Extractor and produces declaration nodes and syntactic call/import edges without full semantic analysis.
This extractor handles classes, interfaces, enums, methods, constructors, imports, method invocations, object creation expressions, and Spring framework route annotations. Edges have provenance "ast_inferred" and confidence 0.7 since tree-sitter parsing does not provide full type resolution for Java.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JavaExtractor ¶
type JavaExtractor struct{}
JavaExtractor implements types.Extractor for Java files using tree-sitter AST parsing. Thread-safe: each Extract call creates its own parser (required for concurrent use; tree-sitter parsers are not goroutine-safe).
func NewJavaExtractor ¶
func NewJavaExtractor() *JavaExtractor
NewJavaExtractor creates a new JavaExtractor.
func (*JavaExtractor) CanHandle ¶
func (e *JavaExtractor) CanHandle(path string) bool
CanHandle returns true for .java files, excluding files in build/ and target/ directories (Maven/Gradle output).
func (*JavaExtractor) Extract ¶
func (e *JavaExtractor) Extract(ctx context.Context, opts types.ExtractOptions) (*types.ExtractResult, error)
Extract parses the Java file with tree-sitter and produces nodes for declarations and edges for calls and imports.