Crate coffer[][src]

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.

Re-exports

pub use rw::*;
pub use crate::error::Error;
pub use crate::error::Result;

Modules

annotation
attr
code

Structures that represent instructions that will be executed when a method is called.

constants

Constants that can be found in Java class files.

cp

This module contains structures representing a constant pool and its entries.

dynamic
error

The error module contains errors that may be raised when invalid data is encountered.

flags

The flags module contains bitflag structures representing flags of java classes such as class access flags, field access flags, and module export flags.

loadable

Loadable values. These types can be loaded on to the stack, and it is usually stored in the constant pool.

member

Members of a java class

mod_utf8

Module for converting between Java’s Modified UTF-8 and UTF-8.

module

A Module is not a class, but it is still represented by a .class file.

prelude

Re-exports

rw
signature

In java, signatures are additional information encoded for type arguments in classes and methods.

ty

A type represents a field descriptor or a method descriptor.

version

this module defines structures and enum for java version.

Macros

read_from

Helper macro to disambigurate if a type implements both ConstantPoolReadWrite and ReadWrite.

try_cp_read

helpful macro to return an error if the constant entry is not found or occupied by a double-sized entry.

try_cp_read_idx
write_to

Helper macro to disambigurate if a type implements both ConstantPoolReadWrite and ReadWrite.

Structs

Class