Skip to main content

parse_class

Function parse_class 

Source
pub fn parse_class(bytes: &[u8]) -> ClasspathResult<ClassStub>
Expand description

Parse a .class file’s bytes into a ClassStub.

This function handles the base class parsing: class metadata, methods, fields, superclass, interfaces, inner classes, enum constants, record components, and source file. It does NOT parse generics (U05), annotations (U06), lambdas (U07a), or modules (U07b) — those are handled by separate parsers that enrich the stub.

§Errors

Returns ClasspathError::BytecodeParseError if the bytes cannot be parsed as a valid class file. Individual method/field parse failures are logged as warnings and the member is skipped.