summaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/utils/nodes/MethodProxyInsnNode.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/ftbsc/lll/utils/nodes/MethodProxyInsnNode.java')
-rw-r--r--src/main/java/ftbsc/lll/utils/nodes/MethodProxyInsnNode.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main/java/ftbsc/lll/utils/nodes/MethodProxyInsnNode.java b/src/main/java/ftbsc/lll/utils/nodes/MethodProxyInsnNode.java
new file mode 100644
index 0000000..2e062f4
--- /dev/null
+++ b/src/main/java/ftbsc/lll/utils/nodes/MethodProxyInsnNode.java
@@ -0,0 +1,23 @@
+package ftbsc.lll.utils.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);
+ }
+}