java

package
v0.0.0-...-be3c4a6 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

Adapter implements the LanguageAdapter interface in Java. Use Tree-sitter to parse Java source code and extract comments and their context

func NewAdapter

func NewAdapter(lang ...string) *Adapter

NewAdapter creates a new Java adapter instance Initialize the Tree-sitter parser and load the Java grammar

func (*Adapter) Language

func (a *Adapter) Language() string

Language returns the language identifier ("java")

func (*Adapter) Parse

func (a *Adapter) Parse(file string, src []byte) ([]*domain.Comment, error)

Parse the provided Java source code and extract comments Returns a list of domain.Comment objects containing the comment text, location, and context symbols. If src is nil, read the source code from the file path.

Jump to

Keyboard shortcuts

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