Skip to main content

extract_module

Function extract_module 

Source
pub fn extract_module(
    class: &ClassFile<'_>,
) -> ClasspathResult<Option<ModuleStub>>
Expand description

Extract module information from a parsed class file.

Searches the class-level attributes for a Module attribute and converts it into a ModuleStub. Module names, package names, and class names are all converted from JVM internal form (/ separator) to FQN form (. separator).

Returns Ok(None) if the class file does not contain a Module attribute (i.e., it is not a module-info.class). Returns an error if the Module attribute is present but cannot be converted.