Expand description
Emit classpath nodes and edges into the sqry unified graph.
This module takes a ClasspathIndex (produced by bytecode parsing) and
emits synthetic graph nodes and edges into a StagingGraph. Each JAR gets
a synthetic FileId via FileRegistry::register_external(), and each
class/method/field becomes a graph node with zero-span metadata (since the
data comes from bytecode, not source).
§Emission pipeline
- File registration - For each unique JAR path, register a synthetic
FileEntrywith path convention{jar_path}!/{fqn}.class. - Node emission - For each
ClassStub, emit nodes for the class itself, its methods, fields, annotations, type parameters, enum constants, lambda targets, and module declarations. - Structural edges - Class→Method (
Defines), Class→Field (Defines), Class→InnerClass (Contains). - Metadata attachment -
ClasspathNodeMetadataon all emitted nodes (class, method, field, enum constant, type parameter, lambda target, module).
After emission, the returned FQN→NodeId mapping is used by
register_classpath_exports and create_classpath_edges for ExportMap
registration and cross-reference edge creation.
Structs§
- Classpath
Node Ref - Duplicate-aware emitted node reference.
- Emission
Result - Result of classpath node emission.
Functions§
- create_
classpath_ edges - Create inheritance, generic, annotation, module, and inner-class edges for classpath nodes.
- emit_
classpath_ nodes - Emit all classpath nodes and edges into a staging graph.
- emit_
into_ code_ graph - Emit classpath nodes and structural edges directly into a
CodeGraph. - register_
classpath_ exports - Register classpath nodes in the
ExportMapfor cross-file resolution.