當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。