Documentation
¶
Overview ¶
Package java implements a tree-sitter-based parser for Java source files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
Dependency represents an import declaration.
type Entity ¶
type Entity struct {
Name string
Type string // "class" | "interface" | "enum" | "annotation" | "method"
Kind string
Signature string
StartLine int
EndLine int
Docs string
Parent string // enclosing type name, or ""
}
Entity represents a named Java code element.
type JavaParser ¶
type JavaParser struct{}
JavaParser is the entry point.
func (*JavaParser) Parse ¶
func (p *JavaParser) Parse(filePath string, content string) (*ParseResult, error)
Parse parses a Java source file using tree-sitter.
type ParseResult ¶
type ParseResult struct {
FilePath string
Entities []*Entity
Dependencies []*Dependency
}
ParseResult is the output of Parse.
Click to show internal directories.
Click to hide internal directories.