The Wayback Machine - https://web.archive.org/web/20200916120246/https://github.com/Col-E/Bytecode-Modification-Framework
Skip to content
This repository has been archived by the owner. It is now read-only.
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.md

Bytecode Modification Framework

BMF is an alternative JVM bytecode modification framework that (if desired) will hide nothing about the class structure behind abstraction (But in the future abstraction will certainly be an option).

Notable Features

  • Simplified renaming of classes, fields, and methods
  • Direct access to the constant pool.

Example: Renaming classes and members

Renaming classes and their members is designed currently to function given a jar file.

Here is an example for renaming a single class and one of its methods.

JarReader read = new JarReader(new File(IN_FILE), true, true);
read.getMapping().getMapping("com/example/game/Edible").name.setValue("com/example/game/Consumable");
read.getMapping().getMapping("com/example/game/Edible").getMemberMapping("isRotten", "()Z").name.setValue("hasDecayed");
read.saveTo(new File(OUT_FILE));

To rename each item takes only a single line of code. The affects of this change are instantaneous across the program since all class names link to a single instance.

What needs finishing

This library is still a heavy WIP and the main focus is remapping classes, so some basic functionality not-pertaining to remapping still needs to be completed. For example there is no way to edit instructions in a method.

Credits

Matthew Dupraz

  • Wrote the original Readme
  • Box class + beginnings of the remapping system
  • Large portion of the Type classes
  • Squashing several bugs

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.