jvmhelpers

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package jvmhelpers mirrors src/main/java/.../detector/StructuresDetectorHelper.java + AbstractJavaMessagingDetector helpers for JVM-family Go detectors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddExtendsEdge

func AddExtendsEdge(sourceNodeID, targetName string, _ model.NodeKind, edges []*model.CodeEdge) []*model.CodeEdge

AddExtendsEdge mirrors StructuresDetectorHelper.addExtendsEdge. targetKind is the kind for the placeholder reference node (CLASS or INTERFACE). The placeholder ID is just targetName (per Java), since the Java helper creates a CodeNode with id == targetName for the target reference.

func AddImplementsEdge

func AddImplementsEdge(sourceNodeID, targetName string, edges []*model.CodeEdge) []*model.CodeEdge

AddImplementsEdge mirrors StructuresDetectorHelper.addImplementsEdge.

func AddImportEdge

func AddImportEdge(filePath, target string, edges []*model.CodeEdge) []*model.CodeEdge

AddImportEdge appends an IMPORTS edge sourced at filePath pointing at target. Mirrors StructuresDetectorHelper.addImportEdge.

func AddMessagingEdge

func AddMessagingEdge(sourceID, targetID string, kind model.EdgeKind, label string,
	props map[string]any, edges []*model.CodeEdge,
) []*model.CodeEdge

AddMessagingEdge mirrors AbstractJavaMessagingDetector.addMessagingEdge. Java messaging detectors' defaultConfidence() bumps the regex-default LEXICAL up to SYNTACTIC — but that floor is stamped at the orchestration boundary (DetectorEmissionDefaults), not here. The helper just returns the edge with default ConfidenceLexical; the orchestration layer rewrites it.

func CreateStructureNode

func CreateStructureNode(filePath, name string, kind model.NodeKind, lineStart int) *model.CodeNode

CreateStructureNode mirrors StructuresDetectorHelper.createStructureNode. ID = filePath + ":" + name (matches Java exactly).

func ExtractClassName

func ExtractClassName(text string) string

ExtractClassName returns the first matching class name in text, or "". Mirrors AbstractJavaMessagingDetector.extractClassName (returns null in Java, "" in Go — callers must check IsEmpty).

Types

This section is empty.

Jump to

Keyboard shortcuts

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