Skip to main content

Module model

Module model 

Source
Expand description

Stub data model types for parsed JVM bytecode.

This module defines the intermediate representation produced by bytecode parsing. Each .class file is parsed into a ClassStub containing methods, fields, annotations, generic signatures, and JVM-specific metadata (modules, records, lambdas, Kotlin/Scala metadata).

All types are pure data — no parsing logic lives here. They are designed for efficient binary serialization via postcard and are Send + Sync by construction (all fields are owned).

Structs§

AccessFlags
Bitflag-style JVM access modifiers (JVMS Table 4.1-A/B).
AnnotationElement
A single element (key-value pair) within an annotation.
AnnotationStub
A single annotation instance (runtime-visible or runtime-invisible).
ClassStub
Parsed representation of a single .class file.
FieldStub
Parsed field declaration from a .class file.
GenericClassSignature
Class-level generic signature.
GenericMethodSignature
Method-level generic signature.
InnerClassEntry
An entry from the InnerClasses attribute (JVMS 4.7.6).
KotlinMetadataStub
Raw Kotlin metadata extracted from the @kotlin.Metadata annotation.
LambdaTargetStub
A lambda or method-reference target extracted from the BootstrapMethods attribute (specifically LambdaMetafactory entries).
MethodStub
Parsed method declaration from a .class file.
ModuleExports
An exports directive in a module descriptor.
ModuleOpens
An opens directive in a module descriptor.
ModuleProvides
A provides directive in a module descriptor.
ModuleRequires
A requires directive in a module descriptor.
ModuleStub
Module descriptor parsed from module-info.class (JVMS 4.7.25).
OrderedFloat
Wrapper around f32 that provides PartialEq with total ordering (treating NaN as equal to NaN) for use in ConstantValue.
RecordComponent
A record component (parameter of a record class).
ScalaSignatureStub
Raw Scala signature extracted from the @ScalaSignature annotation.
TypeParameterStub
A formal type parameter declaration (e.g., T extends Comparable<T>).

Enums§

AnnotationElementValue
The value of an annotation element (JVMS 4.7.16.1).
BaseType
JVM primitive types and void.
ClassKind
Discriminates the kind of a class-file entity.
ConstantValue
Constant value from the ConstantValue attribute (JVMS 4.7.2) or annotation element values.
ReferenceKind
Method handle reference kinds (JVMS 5.4.3.5, Table 5.4.3.5-A).
TypeArgument
A type argument in a parameterized type (JVMS 4.7.9.1).
TypeSignature
JVM type signature with full generic information.
WildcardBound
Wildcard bound direction.