Skip to main content

java_class_rs/
lib.rs

1//! Java class file format parser.
2//!
3//! Parses `.class` files according to the JVM Specification (JVMS Chapter 4).
4//! Supports all 17 constant pool entry types, access flags, fields, methods,
5//! and 20+ specialized attributes including Code, StackMapTable, BootstrapMethods,
6//! annotations, and more.
7//!
8//! # Example
9//!
10//! ```no_run
11//! use java_class_rs::parse_classfile;
12//!
13//! fn main() {
14//!     let data = std::fs::read("MyClass.class").unwrap();
15//!     let (_, class_file) = parse_classfile(&data).unwrap();
16//!     println!("Class: {:?}", class_file.this_class_name());
17//! }
18//! ```
19
20mod attribute;
21mod constant_pool;
22mod field;
23mod method;
24mod parser;
25mod types;
26
27pub use parser::parse_classfile;
28pub use types::*;
29
30// Re-export commonly used helpers
31pub use attribute::parse_specialized_attribute;
32pub use constant_pool::{get_entry, get_utf8};