javaextractor

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2026 License: MIT Imports: 12 Imported by: 0

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

Extract parses the Java file with tree-sitter and produces nodes for declarations and edges for calls and imports.

func (*JavaExtractor) Name

func (e *JavaExtractor) Name() string

Name returns the extractor name.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL