A Java bytecode engineering toolkit that simplifies runtime class definition and bytecode manipulation with source-level and bytecode-level APIs.
Javassist is a Java bytecode engineering toolkit that enables runtime class definition and bytecode manipulation. It provides both source-level and bytecode-level APIs, allowing developers to edit class files without deep bytecode knowledge or directly manipulate bytecode for advanced control. It simplifies dynamic code generation and modification in Java applications.
Java developers and framework authors who need to perform runtime metaprogramming, such as creating dynamic proxies, implementing aspect-oriented programming (AOP), or building tools that modify class behavior.
Developers choose Javassist for its simplicity and dual API approach, which lowers the barrier to bytecode manipulation compared to raw bytecode libraries while still offering fine-grained control when needed.
Java bytecode engineering toolkit
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows editing class files using Java language vocabulary, making bytecode manipulation accessible without learning bytecode specifications, as highlighted in the README.
Provides both source-level and bytecode-level APIs, catering to different expertise levels and enabling fine-grained control when needed, per the project's philosophy.
Enables runtime definition of new classes, essential for implementing aspect-oriented programming (AOP) and dynamic proxies, as stated in the key features.
Compiles source text to bytecode dynamically, simplifying code injection and modification without manual bytecode editing, as described in the README.
The source-level API introduces compilation and reflection overhead, making it slower than direct bytecode libraries like ASM for performance-critical applications.
As a long-established project, it may lack timely updates for the latest Java features or integrations with modern frameworks, potentially limiting adoption in new ecosystems.
Runtime bytecode manipulation can lead to subtle class loading issues and hard-to-trace errors, requiring deep expertise to troubleshoot effectively.