GitXplorerGitXplorer
i

java2asm

public
6 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
deedf50f46364b7a62b762c0c87af2b6b1f7df0c

License.

iint3 committed 11 years ago
Unverified
6f269e6c74fd1a37ca838c91771c7f39a59e6747

My PR has been merged upstream.

iint3 committed 11 years ago
Unverified
ba302cf951b3e56c28e296ae682eb5f613b2e4e5

Add README.

iint3 committed 11 years ago
Unverified
3702644bc44442a3f0706b3499b0a382d0bce165

Tweak build.

iint3 committed 11 years ago
Unverified
70431aa1429514d1e428244744a1ca69fe2c9000

Don't bother with PreMain.

iint3 committed 11 years ago
Unverified
2399a1d3c32f5bdf65159c3799408952330f4842

Split out transformer.

iint3 committed 11 years ago

README

The README file for this repository.

java2asm

Simple tool to make generation of ASM API calls easier.

Basically, it parses javac's classfile output and creates a ClassFileTransformer that appends and / or replaces method calls.

Dependencies

python-javatools version >= 1.4.0. Currently PyPI only has 1.3.0, so install it from GitHub.

asm-4.1.jar. Put this in the source directory.

Limitations

No branching / exception handling opcodes have been implemented. But you can insert method calls to external functions and do all your control flow there, so this shouldn't be a real issue.

Example

Example.java:

@interface prepend {}
@interface replace {}

public class Example {
    
    @prepend
    public void foo() {
        System.out.println("Hello world");
    }

    @replace
    public void bar() {
        System.out.println("Hello world");
    }
}

javac Example.java && PATCHES=Example.class make