org.jetbrains.java.decompiler.main.decompiler.BaseDecompiler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vineflower Show documentation
Show all versions of vineflower Show documentation
Modern Java & JVM language decompiler aiming to be as accurate as possible, with an emphasis on output quality.
The newest version!
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.main.decompiler;
import org.jetbrains.java.decompiler.main.Fernflower;
import org.jetbrains.java.decompiler.main.extern.IBytecodeProvider;
import org.jetbrains.java.decompiler.main.extern.IContextSource;
import org.jetbrains.java.decompiler.main.extern.IFernflowerLogger;
import org.jetbrains.java.decompiler.main.extern.IResultSaver;
import java.io.File;
import java.util.Map;
@SuppressWarnings("unused")
public class BaseDecompiler {
private final Fernflower engine;
public BaseDecompiler(IResultSaver saver, Map options, IFernflowerLogger logger) {
engine = new Fernflower(saver, options, logger);
}
@Deprecated
public BaseDecompiler(IBytecodeProvider provider, IResultSaver saver, Map options, IFernflowerLogger logger) {
engine = new Fernflower(provider, saver, options, logger);
}
public void addSource(IContextSource source) {
engine.addSource(source);
}
public void addSource(File source) {
engine.addSource(source);
}
public void addLibrary(IContextSource source) {
engine.addLibrary(source);
}
public void addLibrary(File library) {
engine.addLibrary(library);
}
public void decompileContext() {
try {
engine.decompileContext();
}
finally {
engine.clearContext();
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy