-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding automatic decompiling of compiled expressions... so it goes from
formula->code->javasource although the java source is only useful for debugging there is no need to save it since its so fast
- Loading branch information
Showing
3 changed files
with
118 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package arb.expressions; | ||
|
||
import java.io.File; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
import org.jetbrains.java.decompiler.main.decompiler.*; | ||
import org.jetbrains.java.decompiler.main.extern.IFernflowerLogger; | ||
import org.jetbrains.java.decompiler.main.extern.IResultSaver; | ||
|
||
/** | ||
* TODO: integrate this with {@link Expression} | ||
*/ | ||
public class Decompiler | ||
{ | ||
public static void main(String[] args) | ||
{ | ||
IResultSaver saver = new DirectoryResultSaver(new File(".")); | ||
|
||
IFernflowerLogger logger = new PrintStreamLogger(System.out); | ||
|
||
Map<String, Object> options = new HashMap<>(); | ||
|
||
BaseDecompiler decompiler = new BaseDecompiler(saver, | ||
options, | ||
logger); | ||
|
||
File sourceClassFile = new File(args[0]); | ||
|
||
decompiler.addSource(sourceClassFile); | ||
decompiler.decompileContext(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters