#java-class #reading #read-write #parameters #constant #pool #require

coffer

A lightweight and fast library for reading and writing Java classes

2 stable releases

1.0.1 Apr 28, 2021
1.0.0 Apr 27, 2021

#33 in #java-class

LGPL-3.0-or-later

240KB
4.5K SLoC

Coffer - a lightweight and fast library for reading and writing Java classes

Licensed under LGPL v3 or later, a copy of the Lesser GNU General Public License can be found by the name of LICENSE.md

Running tests

Use cargo test to run tests that do not require java.

Tests that require java are ignored by default, to add them, make sure you have java in your path and run cargo test -- --include-ignored (stable 1.51 and above).


lib.rs:

Coffer is a lightweight and fast library for reading and writing Java classes.

Read and write functions are exposed via the traits ReadWrite and ConstantPoolReadWrite when the information from the constant pool is needed to get the information.

ReadWrite uses instances of Read and Write, and ConstantPoolReadWrite uses additional parameters: instances of ConstantPoolWriter and ConstantPoolReader. These traits represent read and write access to the constant pool.

Many implementors of ReadWrite and ConstantPoolReadWrite uses a derive macro internally to avoid repeating implementation for structures that just calls the trait functions of its fields.

Dependencies

~5MB
~101K SLoC