Add constructor for cloning a Library

bzip2
Graham 5 years ago
parent 3366156d92
commit f0cb9d40e2
  1. 8
      asm/src/main/java/dev/openrs2/asm/Library.java

@ -70,6 +70,14 @@ public final class Library implements Iterable<ClassNode> {
/* empty */ /* empty */
} }
public Library(Library library) {
for (var clazz : library.classes.values()) {
var copy = new ClassNode();
clazz.accept(copy);
add(copy);
}
}
public boolean contains(String name) { public boolean contains(String name) {
return classes.containsKey(name); return classes.containsKey(name);
} }

Loading…
Cancel
Save