javacode

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

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

Parser implements a Java code parser

func NewParser

func NewParser() *Parser

NewParser creates a new Java parser

func (*Parser) Parse

func (p *Parser) Parse(ctx context.Context, r io.Reader) ([]core.Chunk, error)

Parse parses Java code into chunks

func (*Parser) ParseWithCallback

func (p *Parser) ParseWithCallback(ctx context.Context, r io.Reader, callback func(core.Chunk) error) error

ParseWithCallback parses Java code and calls the callback for each chunk

func (*Parser) SetChunkOverlap

func (p *Parser) SetChunkOverlap(overlap int)

SetChunkOverlap sets the chunk overlap

func (*Parser) SetChunkSize

func (p *Parser) SetChunkSize(size int)

SetChunkSize sets the chunk size

func (*Parser) SetExtractClasses

func (p *Parser) SetExtractClasses(extract bool)

SetExtractClasses sets whether to extract classes

func (*Parser) SetExtractComments

func (p *Parser) SetExtractComments(extract bool)

SetExtractComments sets whether to extract comments

func (*Parser) SetExtractMethods

func (p *Parser) SetExtractMethods(extract bool)

SetExtractMethods sets whether to extract methods

func (*Parser) SupportedFormats

func (p *Parser) SupportedFormats() []string

Jump to

Keyboard shortcuts

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