aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/tools/nodes/MethodProxyInsnNode.java
blob: 73a26d70916d4d12e5c1729daeaaeeeadf9bad2c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package ftbsc.lll.tools.nodes;

import ftbsc.lll.proxies.impl.MethodProxy;
import org.objectweb.asm.tree.MethodInsnNode;

/**
 * Overrides the {@link MethodInsnNode} to add a constructor
 * taking in a {@link MethodProxy}.
 * @since 0.3.0
 */
public class MethodProxyInsnNode extends MethodInsnNode {

   /**
    * Constructs a new {@link MethodInsnNode} starting
    * from a {@link MethodProxy}.
    * @param opcode the opcode, must be one of INVOKEVIRTUAL,
    *               INVOKESPECIAL, INVOKESTATIC or INVOKEINTERFACE
    * @param m a {@link MethodProxy} representing the method to call
    */
   public MethodProxyInsnNode(int opcode, MethodProxy m) {
      super(opcode,  m.parent.internalName, m.name, m.descriptor);
   }
}