Documentation
¶
Overview ¶
Package jvmhelpers mirrors src/main/java/.../detector/StructuresDetectorHelper.java + AbstractJavaMessagingDetector helpers for JVM-family Go detectors.
Index ¶
- func AddExtendsEdge(sourceNodeID, targetName string, _ model.NodeKind, edges []*model.CodeEdge) []*model.CodeEdge
- func AddImplementsEdge(sourceNodeID, targetName string, edges []*model.CodeEdge) []*model.CodeEdge
- func AddImportEdge(filePath, target string, edges []*model.CodeEdge) []*model.CodeEdge
- func AddMessagingEdge(sourceID, targetID string, kind model.EdgeKind, label string, ...) []*model.CodeEdge
- func CreateStructureNode(filePath, name string, kind model.NodeKind, lineStart int) *model.CodeNode
- func ExtractClassName(text string) string
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 ¶
AddImplementsEdge mirrors StructuresDetectorHelper.addImplementsEdge.
func AddImportEdge ¶
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 ¶
CreateStructureNode mirrors StructuresDetectorHelper.createStructureNode. ID = filePath + ":" + name (matches Java exactly).
func ExtractClassName ¶
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.