aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/tools/InsnSequence.java
diff options
context:
space:
mode:
author zaaarf <zaaarf@proton.me>2023-02-07 16:20:36 +0100
committer zaaarf <zaaarf@proton.me>2023-02-07 16:20:36 +0100
commit2cdad9a48281540b7b0573c5fcb2185c772f8298 (patch)
tree6e1afc645c556b15da5eea421a0ff22e12455883 /src/main/java/ftbsc/lll/tools/InsnSequence.java
parentf2145f8ab7a01f34bd2a98edee9f0f9c4161af8b (diff)
feat: implemented descriptorbuilder, added feature to InsnSequence
Diffstat (limited to 'src/main/java/ftbsc/lll/tools/InsnSequence.java')
-rw-r--r--src/main/java/ftbsc/lll/tools/InsnSequence.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/ftbsc/lll/tools/InsnSequence.java b/src/main/java/ftbsc/lll/tools/InsnSequence.java
index f778590..4afd626 100644
--- a/src/main/java/ftbsc/lll/tools/InsnSequence.java
+++ b/src/main/java/ftbsc/lll/tools/InsnSequence.java
@@ -13,6 +13,14 @@ import java.util.Objects;
public class InsnSequence extends InsnList {
/**
* Public constructor.
+ * This creates an empty sequence.
+ */
+ public InsnSequence() {
+ super();
+ }
+
+ /**
+ * Public constructor.
* Must be given two non-null, connected nodes.
* @param startNode the starting node of the pattern
* @param endNode the first node of the pattern
@@ -42,6 +50,15 @@ public class InsnSequence extends InsnList {
}
/**
+ * Adds an array of nodes to the list.
+ * @param nodes the nodes to add
+ */
+ public void add(AbstractInsnNode... nodes) {
+ for(AbstractInsnNode node : nodes)
+ super.add(node);
+ }
+
+ /**
* Replaces a node with another one. Mostly used internally.
* @param oldNode node to replace
* @param newNode new node