java

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package java implements a gorisk analyzer for Java projects. It supports Maven pom.xml and Gradle gradle.lockfile / build.gradle.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Detect

func Detect(dir string) capability.CapabilitySet

Detect walks .java files in dir and returns the combined capability set.

Types

type Adapter

type Adapter struct{}

Adapter implements the analyzer.Analyzer interface for Java projects.

func (*Adapter) Load

func (a *Adapter) Load(dir string) (*graph.DependencyGraph, error)

Load parses the Java dependency lockfile in dir, detects capabilities from .java source files, and returns a *graph.DependencyGraph.

func (*Adapter) Name

func (a *Adapter) Name() string

type JavaPackage

type JavaPackage struct {
	Name         string // groupID/artifactID
	GroupID      string
	ArtifactID   string
	Version      string
	Dir          string
	Dependencies []string
	Direct       bool
}

JavaPackage represents a Java dependency extracted from a lockfile.

func Load

func Load(dir string) (pkgs []JavaPackage, retErr error)

Load detects and parses the Java dependency lockfile in dir. Detection order: pom.xml → build.gradle / gradle.lockfile Load never panics; it returns a structured error on failure.

Jump to

Keyboard shortcuts

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