summaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/tools/InsnSequence.java
diff options
context:
space:
mode:
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