File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
src/main/java/the/bytecode/club/jda/decompilers Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 2929import java .nio .file .Files ;
3030import java .nio .file .Path ;
3131import java .util .List ;
32+ import java .util .Set ;
3233
3334/**
3435 * CFR Java Wrapper
@@ -139,15 +140,15 @@ public void decompileToZip(String zipName) {
139140 }
140141
141142 public String [] generateMainMethod () {
142- // String[] result = new String[getSettings().size() * 2 + 1] ;
143- // result[0] = "bytecodeviewer" ;
144- // int index = 1 ;
145- // for (Settings setting : Settings.values()) {
146- // result[index++] = "--" + setting.getParam();
147- // result[index++] = String.valueOf(getSettings().getBoolean( setting)) ;
148- // }
149- // return result;
150- return new String [ 0 ] ;
143+ Set < SettingsEntry > entries = settings . getEntries () ;
144+ String [] result = new String [ entries . size () * 2 + 1 ] ;
145+ result [ 0 ] = "bytecodeviewer" ;
146+ int index = 1 ;
147+ for ( SettingsEntry setting : entries ) {
148+ result [index ++] = "--" + setting . param ;
149+ result [ index ++] = String . valueOf ( setting . getBool ());
150+ }
151+ return result ;
151152 }
152153
153154 public static String doClass (DCCommonState dcCommonState , byte [] content1 ) throws Exception {
You can’t perform that action at this time.
0 commit comments