java

package
v0.0.0-...-aa42d66 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JavaTypeToGoType = map[string]struct {
	GoName string
	Kind   reflect.Kind
}{
	"boolean": {"bool", reflect.Bool},
	"char":    {"rune", reflect.Int32},
	"byte":    {"byte", reflect.Uint8},
	"short":   {"int16", reflect.Int16},
	"int":     {"int32", reflect.Int32},
	"long":    {"int64", reflect.Int64},
	"float":   {"float32", reflect.Float32},
	"double":  {"float64", reflect.Float64},
	"String":  {"string", reflect.String},
	"void":    {"void", reflect.Invalid},
}

JavaTypeToGoType maps Java primitive types to Go equivalents

Functions

This section is empty.

Types

type Emitter

type Emitter struct{}

func (*Emitter) Emit

func (g *Emitter) Emit(file *graph.File) ([]byte, error)

type Inspector

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

Inspector provides functionality to inspect Java code and extract type information

func NewInspector

func NewInspector(config *graph.Config) *Inspector

NewInspector creates a new Java Inspector with the provided configuration

func (*Inspector) InspectFile

func (i *Inspector) InspectFile(filename string) (*graph.File, error)

InspectFile parses a Java source file and extracts types

func (*Inspector) InspectPackage

func (i *Inspector) InspectPackage(packagePath string) (*graph.Package, error)

InspectPackage inspects a Java package directory and extracts all types

func (*Inspector) InspectPackages

func (i *Inspector) InspectPackages(rootPath string) ([]*graph.Package, error)

InspectPackages inspects multiple Go package directories recursively

func (*Inspector) InspectProject

func (i *Inspector) InspectProject(location string) (*graph.Project, error)

InspectProject parses a Go source file and extracts types

func (*Inspector) InspectSource

func (i *Inspector) InspectSource(src []byte) (*graph.File, error)

InspectSource parses Java source code from a byte slice and extracts types

Jump to

Keyboard shortcuts

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