当前位置: 首页>>代码示例>>Java>>正文


Java PluginRunner类代码示例

本文整理汇总了Java中org.benf.cfr.reader.PluginRunner的典型用法代码示例。如果您正苦于以下问题:Java PluginRunner类的具体用法?Java PluginRunner怎么用?Java PluginRunner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PluginRunner类属于org.benf.cfr.reader包,在下文中一共展示了PluginRunner类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: clazz

import org.benf.cfr.reader.PluginRunner; //导入依赖的package包/类
static String clazz(String path) {
    int i = path.lastIndexOf("!/");// filesystem path can contain ! but java can not
    if (i == -1) throw new IllegalArgumentException();
    PluginRunner r = new PluginRunner(OPT);
    String head = path.substring(0, i);
    r.addJarPath(head);
    String tail = path.substring(i + 2, path.length() - 6);
    return r.getDecompilationFor(tail);
}
 
开发者ID:caoli5288,项目名称:java-decompiler-plugin-cfr,代码行数:10,代码来源:Impl.java

示例2: decompile

import org.benf.cfr.reader.PluginRunner; //导入依赖的package包/类
/**
 * Decompiled the class.
 */
private void decompile() {
	String name = classNode.name;
	String text = new PluginRunner(CFRParameter.toStringMap(), new CFRSourceImpl(lookupHelper)).getDecompilationFor(name);
	// Hack to substring the first indent (Where the isolated method begins)
	// to the end of the class, minus one (so it substrings to the method's
	// closing brace)
	if (methodNode != null) {
		text = text.substring(text.indexOf("    "), text.lastIndexOf("}") - 1);
	}
	textArea.setText(text);
	textArea.moveCaretPosition(0);
}
 
开发者ID:Col-E,项目名称:Recaf,代码行数:16,代码来源:DecompilePanel.java

示例3: onClassSelect

import org.benf.cfr.reader.PluginRunner; //导入依赖的package包/类
/**
 * Called when a class in the file tree is selected.
 * 
 * @param mapping
 */
public void onClassSelect(ClassMapping clazz) {
	String originalName = clazz.name.original;
	// Update current class
	this.currentClass = clazz;
	// window.getHistory().addHistory(clazz);
	// Decompile using CFR, send text to the text-area.
	try {
		PluginRunner pluginRunner = new PluginRunner(CFRSetting.toStringMap(), new CFRSourceImpl(lookupHelper));
		String decomp = pluginRunner.getDecompilationFor(originalName);
		window.openSourceTab(clazz.name.getValue(), decomp);
	} catch (Exception e) {
		window.openTab("Error", "Error: CFR failed to decompile this class:\n" + e.getMessage());
	}
}
 
开发者ID:Col-E,项目名称:JRemapper,代码行数:20,代码来源:JRemapper.java

示例4: fuck

import org.benf.cfr.reader.PluginRunner; //导入依赖的package包/类
static String fuck(String path) {
    PluginRunner r = new PluginRunner(OPT);
    r.addJarPath(path);
    return r.getDecompilationFor(path);
}
 
开发者ID:caoli5288,项目名称:java-decompiler-plugin-cfr,代码行数:6,代码来源:Impl.java


注:本文中的org.benf.cfr.reader.PluginRunner类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。