forked from openrs2/openrs2
parent
ca79e234bd
commit
8966d7b531
@ -0,0 +1,39 @@ |
||||
package dev.openrs2.asm; |
||||
|
||||
import org.objectweb.asm.Opcodes; |
||||
import org.objectweb.asm.tree.ClassNode; |
||||
import org.objectweb.asm.tree.MethodNode; |
||||
|
||||
public abstract class Transformer { |
||||
public final void transform(Library library) { |
||||
preTransform(library); |
||||
|
||||
for (var clazz : library) { |
||||
transformClass(clazz); |
||||
|
||||
for (var method : clazz.methods) { |
||||
if ((method.access & (Opcodes.ACC_NATIVE | Opcodes.ACC_ABSTRACT)) == 0) { |
||||
transformMethod(clazz, method); |
||||
} |
||||
} |
||||
} |
||||
|
||||
postTransform(library); |
||||
} |
||||
|
||||
public void preTransform(Library library) { |
||||
/* empty */ |
||||
} |
||||
|
||||
public void transformClass(ClassNode clazz) { |
||||
/* empty */ |
||||
} |
||||
|
||||
public void transformMethod(ClassNode clazz, MethodNode method) { |
||||
/* empty */ |
||||
} |
||||
|
||||
public void postTransform(Library library) { |
||||
/* empty */ |
||||
} |
||||
} |
Loading…
Reference in new issue