public class Method
extends java.lang.Object
| Constructor and Description |
|---|
Method(ClassPatcher patcher,
org.objectweb.asm.tree.AbstractInsnNode insnNode) |
| Modifier and Type | Method and Description |
|---|---|
Method |
cast(java.lang.Object cast)
Add a cast check instruction
|
Method |
field(int opcode,
java.lang.Object obj,
java.lang.String name,
java.lang.Object type)
Add a field instruction
|
Method |
frame(int frameOpcode,
java.lang.Object[] locals,
java.lang.Object[] stack)
Adds a frame node
|
org.objectweb.asm.tree.AbstractInsnNode |
getInsnNode() |
Method |
method(int opcode,
java.lang.Object obj,
java.lang.String name,
java.lang.Object... params)
Add a method instruction
|
Method |
node(org.objectweb.asm.tree.AbstractInsnNode node)
Add a custom instruction
|
Method |
node(int opcode)
Add a basic instruction
|
Method |
var(int opcode,
int var)
Add a single var instruction
|
Method |
var(int opcode,
int from,
int to)
Load a range of vars of the same type
|
public Method(ClassPatcher patcher, org.objectweb.asm.tree.AbstractInsnNode insnNode)
public org.objectweb.asm.tree.AbstractInsnNode getInsnNode()
public Method field(int opcode, java.lang.Object obj, java.lang.String name, java.lang.Object type)
opcode - the opcodeobj - the class object or class namename - the field nametype - the type class or namepublic Method var(int opcode, int var)
opcode - the opcodevar - the varpublic Method var(int opcode, int from, int to)
opcode - the opcodefrom - the range beginto - the range endpublic Method method(int opcode, java.lang.Object obj, java.lang.String name, java.lang.Object... params)
opcode - the opcodeobj - the class object or class namename - the method nameparams - the method parameterspublic Method frame(int frameOpcode, java.lang.Object[] locals, java.lang.Object[] stack)
frameOpcode - the frame opcode to insertlocals - local table for this framestack - stack table for this framepublic Method cast(java.lang.Object cast)
cast - the class object or class name to cast topublic Method node(int opcode)
opcode - the opcodepublic Method node(org.objectweb.asm.tree.AbstractInsnNode node)
node - the instruction