public StructContext(IIResultSaver saver, IIDecompiledData decompiledData, LazyLoader loader) { this.saver = saver; this.decompiledData = decompiledData; this.loader = loader; ContextUnit defaultUnit = new ContextUnit(ContextUnit.Type_Folder, null, string.Empty , true, saver, decompiledData); Sharpen.Collections.Put(units, string.Empty, defaultUnit); }
public ContextUnit(int type, string archivePath, string filename, bool own, IIResultSaver resultSaver, IIDecompiledData decompiledData) { // relative path to jar/zip // folder: relative path, archive: file name // class file or jar/zip entry this.type = type; this.own = own; this.archivePath = string.IsNullOrEmpty(archivePath) ? "." : archivePath; this.filename = filename; this.resultSaver = resultSaver; this.decompiledData = decompiledData; }
public Fernflower(IIBytecodeProvider provider, IIResultSaver saver, Dictionary <string , object> customProperties, IFernflowerLogger logger) { Dictionary <string, object> properties = new Dictionary <string, object>(IFernflowerPreferences.Defaults); if (customProperties != null) { Sharpen.Collections.PutAll(properties, customProperties); } string level = (string)properties.GetOrNull(IFernflowerPreferences.Log_Level); if (level != null) { try { logger.SetSeverity(IFernflowerLogger.Severity.ValueOf(level.ToUpper())); } catch (ArgumentException) { } } structContext = new StructContext(saver, this, new LazyLoader(provider)); classProcessor = new ClassesProcessor(structContext); PoolInterceptor interceptor = null; if ("1".Equals(properties.GetOrNull(IFernflowerPreferences.Rename_Entities))) { helper = LoadHelper((string)properties.GetOrNull(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); }
public BaseDecompiler(IIBytecodeProvider provider, IIResultSaver saver, Dictionary <string, object> options, IFernflowerLogger logger) { engine = new Fernflower(provider, saver, options, logger); }