org.jetbrains.java.decompiler.main.extern.IResultSaver Java Examples

The following examples show how to use org.jetbrains.java.decompiler.main.extern.IResultSaver. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Fernflower.java    From javaide with GNU General Public License v3.0 5 votes vote down vote up
public Fernflower(IBytecodeProvider provider, IResultSaver saver, Map<String, Object> customProperties, IFernflowerLogger logger) {
    Map<String, Object> properties = new HashMap<>(IFernflowerPreferences.DEFAULTS);
    if (customProperties != null) {
        properties.putAll(customProperties);
    }

    String level = (String) properties.get(IFernflowerPreferences.LOG_LEVEL);
    if (level != null) {
        try {
            logger.setSeverity(IFernflowerLogger.Severity.valueOf(level.toUpperCase(Locale.US)));
        } catch (IllegalArgumentException ignore) {
        }
    }

    structContext = new StructContext(saver, this, new LazyLoader(provider));
    classProcessor = new ClassesProcessor(structContext);

    PoolInterceptor interceptor = null;
    if ("1".equals(properties.get(IFernflowerPreferences.RENAME_ENTITIES))) {
        helper = loadHelper((String) properties.get(IFernflowerPreferences.USER_RENAMER_CLASS), logger);
        interceptor = new PoolInterceptor();
        converter = new IdentifierConverter(structContext, helper, interceptor);
    } else {
        helper = null;
        converter = null;
    }

    DecompilerContext context = new DecompilerContext(properties, logger, structContext, classProcessor, interceptor);
    DecompilerContext.setCurrentContext(context);
}
 
Example #2
Source File: StructContext.java    From JByteMod-Beta with GNU General Public License v2.0 5 votes vote down vote up
public StructContext(IResultSaver saver, IDecompiledData decompiledData, LazyLoader loader) {
  this.saver = saver;
  this.decompiledData = decompiledData;
  this.loader = loader;
  ContextUnit defaultUnit = new ContextUnit(ContextUnit.TYPE_FOLDER, null, "", true, saver, decompiledData);
  units.put("", defaultUnit);
}
 
Example #3
Source File: ContextUnit.java    From JByteMod-Beta with GNU General Public License v2.0 5 votes vote down vote up
public ContextUnit(int type, String archivePath, String filename, boolean own, IResultSaver resultSaver, IDecompiledData decompiledData) {
  this.type = type;
  this.own = own;
  this.archivePath = archivePath;
  this.filename = filename;
  this.resultSaver = resultSaver;
  this.decompiledData = decompiledData;
}
 
Example #4
Source File: BaseDecompiler.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
public BaseDecompiler(IBytecodeProvider provider, IResultSaver saver, Map<String, Object> options, IFernflowerLogger logger) {
    engine = new Fernflower(provider, saver, options, logger);
}
 
Example #5
Source File: Fernflower.java    From JByteMod-Beta with GNU General Public License v2.0 4 votes vote down vote up
public Fernflower(IBytecodeProvider provider, IResultSaver saver, Map<String, Object> options, IFernflowerLogger logger) {
  structContext = new StructContext(saver, this, new LazyLoader(provider));
  DecompilerContext.initContext(options);
  DecompilerContext.setCounterContainer(new CounterContainer());
  DecompilerContext.setLogger(logger);
}
 
Example #6
Source File: BaseDecompiler.java    From JByteMod-Beta with GNU General Public License v2.0 4 votes vote down vote up
public BaseDecompiler(IBytecodeProvider provider, IResultSaver saver, Map<String, Object> options, IFernflowerLogger logger) {
  fernflower = new Fernflower(provider, saver, options, logger);
}
 
Example #7
Source File: StructContext.java    From JByteMod-Beta with GNU General Public License v2.0 4 votes vote down vote up
public IResultSaver getSaver() {
  return saver;
}
 
Example #8
Source File: StructContextDecorator.java    From Recaf with MIT License 2 votes vote down vote up
/**
 * Constructs a StructContext.
 *
 * @param saver
 * 		Result saver <i>(Unused/noop)</i>
 * @param data
 * 		Data instance, should be an instance of
 * 		{@link me.coley.recaf.decompile.fernflower.FernFlowerAccessor}.
 * @param loader
 * 		LazyLoader to hold links to class resources.
 */
public StructContextDecorator(IResultSaver saver, IDecompiledData data, LazyLoader loader) {
	super(saver, data, loader);
}