summaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/utils/nodes/MethodProxyInsnNode.java
diff options
context:
space:
mode:
author zaaarf <me@zaaarf.foo>2024-01-24 17:16:50 +0100
committer zaaarf <me@zaaarf.foo>2024-01-24 17:16:50 +0100
commitd06b6211bc0815c36d44c65312c097058901b1c5 (patch)
tree1a942f8d9dfd08ff8f06c576f63ba0663ce051b0 /src/main/java/ftbsc/lll/utils/nodes/MethodProxyInsnNode.java
parent660730086dc6b8895eb871a3df98956041453983 (diff)
chore: internal reorganisation (breaking)0.5.0
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);
+ }
+}