Skip to content

An all-purpose mixins framework for Java bytecode manipulation at runtime, targeted at those with minimal understanding of the bytecode structure.

License

Notifications You must be signed in to change notification settings

Revxrsal/Tuna-Bytes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License

Tuna Bytes

A tuna byte :) Tuna-bytes is an all-purpose powerful class and bytecode manipulation mixins for Java, which is intended at those with minimal understanding of the Java bytecode structure.

Features

  • Full support for the notorious Java 9+ versions, as well as Java 8.
  • Does not require access to the source code of classes, and works well even on third-party resources.
  • Does not require any knowledge of the Java bytecode.
  • Requires zero overhead to get started. Just add Tuna-Bytes as a dependency and as an annotation processor, and Tuna-Bytes will handle the rest.
  • Does not require any additional Java execution arguments, like what Java agents do.

Index

Check the wiki for a full overview on the library.

  1. Maven setup
  2. Gradle setup
  3. Getting started
  4. Example: Overwrite a method
  5. Example: Inject into a method
  6. Example: Create accessors for inaccessible fields and methods
  7. Example: Mirroring a field or a method

Drawbacks

Just like any other bytecode manipulation library, manipulating a class after is has been loaded is not possible without things like instrumentation, agents or such. Tuna-bytes assumes that any class it is about to modify has not been loaded, and will otherwise throw an exception. To suppress Class XX has already been loaded exceptions, use MixinsBootstrap.init(true)

About

An all-purpose mixins framework for Java bytecode manipulation at runtime, targeted at those with minimal understanding of the bytecode structure.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages