summaryrefslogtreecommitdiffstats
path: root/src/org/jetbrains/java/decompiler/main/Fernflower.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/jetbrains/java/decompiler/main/Fernflower.java')
-rw-r--r--src/org/jetbrains/java/decompiler/main/Fernflower.java19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/org/jetbrains/java/decompiler/main/Fernflower.java b/src/org/jetbrains/java/decompiler/main/Fernflower.java
index 34f9196..62b8ee4 100644
--- a/src/org/jetbrains/java/decompiler/main/Fernflower.java
+++ b/src/org/jetbrains/java/decompiler/main/Fernflower.java
@@ -18,7 +18,8 @@ package org.jetbrains.java.decompiler.main;
import org.jetbrains.java.decompiler.main.ClassesProcessor.ClassNode;
import org.jetbrains.java.decompiler.main.collectors.CounterContainer;
import org.jetbrains.java.decompiler.main.extern.IBytecodeProvider;
-import org.jetbrains.java.decompiler.main.extern.IDecompilatSaver;
+import org.jetbrains.java.decompiler.main.extern.IFernflowerLogger;
+import org.jetbrains.java.decompiler.main.extern.IResultSaver;
import org.jetbrains.java.decompiler.main.extern.IFernflowerPreferences;
import org.jetbrains.java.decompiler.modules.renamer.IdentifierConverter;
import org.jetbrains.java.decompiler.struct.IDecompiledData;
@@ -28,16 +29,16 @@ import org.jetbrains.java.decompiler.struct.lazy.LazyLoader;
import java.util.Map;
-
public class Fernflower implements IDecompiledData {
private StructContext structContext;
private ClassesProcessor classesProcessor;
- public Fernflower(IBytecodeProvider provider, IDecompilatSaver saver, Map<String, Object> propertiesCustom) {
+ public Fernflower(IBytecodeProvider provider, IResultSaver saver, Map<String, Object> options, IFernflowerLogger logger) {
structContext = new StructContext(saver, this, new LazyLoader(provider));
- DecompilerContext.initContext(propertiesCustom);
+ DecompilerContext.initContext(options);
DecompilerContext.setCounterContainer(new CounterContainer());
+ DecompilerContext.setLogger(logger);
}
public void decompileContext() {
@@ -57,6 +58,11 @@ public class Fernflower implements IDecompiledData {
DecompilerContext.setCurrentContext(null);
}
+ public StructContext getStructContext() {
+ return structContext;
+ }
+
+ @Override
public String getClassEntryName(StructClass cl, String entryName) {
ClassNode node = classesProcessor.getMapRootClasses().get(cl.qualifiedName);
if (node.type != ClassNode.CLASS_ROOT) {
@@ -73,10 +79,7 @@ public class Fernflower implements IDecompiledData {
}
}
- public StructContext getStructContext() {
- return structContext;
- }
-
+ @Override
public String getClassContent(StructClass cl) {
try {
StringBuilder buffer = new StringBuilder();