Skip to main content

Crate sim_codec_classfile

Crate sim_codec_classfile 

Source
Expand description

Frozen scope contract for the bounded, lossless JVM classfile codec.

Parsing is intentionally introduced only after the retained corpus and its independently authored expectations have been fixed.

Structs§

Annotation
One annotation, retaining its unresolved type index, element order, and source range.
AnnotationDefaultAttribute
An AnnotationDefault payload.
AnnotationElement
One annotation element-name/value pair, retained in classfile order.
AnnotationsAttribute
An ordered RuntimeVisibleAnnotations or RuntimeInvisibleAnnotations payload.
AttributeError
A located structured-attribute format error.
AttributeLocation
Stable owner and order evidence for a retained attribute.
AttributeOrigin
The absolute half-open byte range occupied by one annotation structure.
AttributeShell
An uninterpreted attribute spine entry, retained in its original order.
BootstrapMethod
One bootstrap method and its ordered, arity-preserving constant-pool arguments.
BootstrapMethodsAttribute
An ordered BootstrapMethods payload.
ByteAttribute
An opaque byte payload, used by SourceDebugExtension.
ByteError
A byte-lane error located at an absolute input or output offset.
ByteReader
A zero-copy big-endian reader confined to one declared byte region.
ByteWriter
A checked big-endian writer with a hard output budget.
ClassIndex
A constant-pool index proven to name a Class entry.
ClassShell
The bounded structural classfile read, before any shell index is checked.
ClassfileCodec
Binary JVM classfile decoder/encoder exposed as codec/classfile.
ClassfileCodecLib
Host-registered library that installs the codec object and its browse Shapes.
CodeAttribute
The ordered, index-preserving body of a JVM Code attribute.
CodeException
One Code exception-table row, with all offsets and the catch index retained verbatim.
ConstantPool
An index-preserving constant pool whose slots()[index] is the physical JVM slot.
ConstantPoolError
A typed constant-pool failure located at the entry that caused it.
DecodedCode
A decoded code array and its exact first-byte lookup map.
EditReport
Result of one checked method-body edit.
EnclosingMethodAttribute
The EnclosingMethod payload; a zero method index denotes no specific method.
ExceptionHandlerRange
Raw Code-attribute exception-table offsets to validate against decoded instructions.
FieldShell
A raw field declaration whose indices have not been validated.
IndexAttribute
A standard attribute whose payload is exactly one unresolved constant-pool index.
IndexListAttribute
An ordered list of unresolved indices (Exceptions, NestMembers, PermittedSubclasses, or ModulePackages).
InnerClass
One InnerClasses table row.
InnerClassesAttribute
The ordered InnerClasses payload.
Instruction
A decoded instruction whose shape was selected by generated manifest metadata.
InstructionError
A byte-located instruction decoding error.
InstructionId
Stable identity assigned in bytecode order within one decoded code array.
LayoutInvalidation
Checked evidence invalidated by a classfile edit.
LineNumber
One source line mapping in a LineNumberTable.
LineNumberTableAttribute
An ordered LineNumberTable payload.
LocalVariable
One local-variable range, shared by LocalVariableTable and LocalVariableTypeTable.
LocalVariableTarget
One local-variable target range.
LocalVariablesAttribute
An ordered local-variable table payload.
LocatedInstruction
An instruction paired with its stable identity and first byte offset.
MarkerAttribute
A marker attribute (Synthetic or Deprecated), whose payload must be empty.
MethodParameter
One MethodParameters row.
MethodParametersAttribute
The ordered MethodParameters payload.
MethodShell
A raw method declaration whose indices have not been validated.
ModuleAttribute
The complete structural Module payload.
ModuleExport
One exports or opens directive in a Module attribute.
ModuleProvide
One provides directive in a Module attribute.
ModuleRequire
One requires directive in a Module attribute.
NestedAttribute
A nested attribute retained in declaration order with an unresolved name index.
OpcodeMetadata
Generated metadata for one JVM opcode byte.
ParameterAnnotationsAttribute
An ordered RuntimeVisibleParameterAnnotations or RuntimeInvisibleParameterAnnotations payload.
RecordAttribute
The ordered Record payload.
RecordComponent
One component in a Record attribute.
ShellBudget
Limits for allocations made while structurally decoding one classfile shell.
ShellError
A located shell failure, optionally naming the offending raw index.
StackMapTableAttribute
An ordered StackMapTable payload.
TypeAnnotation
One type annotation, including its target union and component path.
TypeAnnotationsAttribute
An ordered runtime-visible or runtime-invisible type-annotation payload.
TypePathEntry
One step in a type annotation’s path from the annotated type to its target component.
Utf8Index
A constant-pool index proven to name a Utf8 entry.
ValidatedClassShell
Typed shell references produced only after structural decoding succeeds.
ValidatedFieldShell
A field projection whose name, descriptor, and attribute names are typed.
ValidatedMethodShell
A method projection whose name, descriptor, and attribute names are typed.

Enums§

AttributeErrorKind
A stable structured-attribute failure category.
AttributeOwner
The legal classfile owner of an attribute shell.
ByteErrorKind
A precise byte-lane failure category.
Constant
One usable JVM constant-pool entry.
ConstantPoolErrorKind
A stable constant-pool failure category.
ConstantSlot
One physical constant-pool index, including indices that cannot be referenced.
ElementValue
A JVM annotation element_value, with every constant-pool index left unresolved.
InstructionErrorKind
Stable instruction decoding failure category.
InstructionOperand
One decoded operand, retaining its semantic role from the opcode manifest.
NestedAttributeOwner
Legal owners for attributes nested inside structured attribute bodies.
Opcode
Stable identity for every byte in the JVM opcode space.
ShellErrorKind
Stable failure category for shell decoding and validation.
StackMapFrame
One compressed stack-map frame, retained without expansion.
TypeAnnotationTarget
The complete target-specific union from JVMS target_info.
VerificationType
A verifier type exactly as represented by verification_type_info.

Constants§

FIXTURE_EXPECTATIONS
Independently authored expectations for every retained fixture.
MAX_ANNOTATION_NESTING
Maximum annotation nesting accepted even when a caller supplies a larger budget.
SCOPE
Machine-readable format bounds and reuse decisions.

Statics§

OPCODES
Complete byte-indexed opcode metadata table.
RECIPES
Cookbook recipes embedded for runtime help and browse surfaces.

Functions§

decode_instructions
Decode JVM instructions using generated metadata plus the three irregular layouts.
decode_modified_utf8
Decode strict JVM modified UTF-8 into exact UTF-16 code units.
encode_instructions
Encode a decoded instruction stream after recomputing offsets, switch padding, and branches.
encode_modified_utf8
Encode exact, well-formed UTF-16 code units as strict JVM modified UTF-8.
inspect_classfile
Decode retained classfile bytes into bounded Table/Dir-compatible data.
standard_attribute_min_major
Earliest classfile major version for a standard attribute.
validate_exception_handlers
Validate Code-attribute exception ranges against an already decoded code array.

Type Aliases§

RecordComponentAttribute
One nested attribute attached to a record component.