File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
src/main/java/the/bytecode/club/jda/decompilers Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1616
1717public abstract class Decompiler {
1818 public Decompiler () {
19- Decompilers .BY_NAME .add ( this );
19+ Decompilers .BY_NAME .put ( getName (), this );
2020 }
2121
2222 protected DecompilerSettings settings = new DecompilerSettings (this );
Original file line number Diff line number Diff line change 22
33import the .bytecode .club .jda .decompilers .bytecode .ClassNodeDecompiler ;
44
5- import java .util .ArrayList ;
65import java .util .Collection ;
76import java .util .Collections ;
8- import java .util .List ;
7+ import java .util .HashMap ;
8+ import java .util .Map ;
99
1010public class Decompilers {
11- static final List < Decompiler > BY_NAME = new ArrayList <>();
11+ static final Map < String , Decompiler > BY_NAME = new HashMap <>();
1212
1313 public final static Decompiler PROCYON = new ProcyonDecompiler ();
1414 public final static Decompiler CFR = new CFRDecompiler ();
@@ -17,6 +17,6 @@ public class Decompilers {
1717
1818
1919 public static Collection <Decompiler > getAllDecompilers () {
20- return Collections .unmodifiableCollection (BY_NAME );
20+ return Collections .unmodifiableCollection (BY_NAME . values () );
2121 }
2222}
You can’t perform that action at this time.
0 commit comments