Updated Java Template
This commit is contained in:
parent
5c40cfa957
commit
74fb0f191c
1 changed files with 22 additions and 14 deletions
|
@ -2,42 +2,50 @@ import java.util.List;
|
||||||
import org.objectweb.asm.tree.ClassNode;
|
import org.objectweb.asm.tree.ClassNode;
|
||||||
import the.bytecode.club.bytecodeviewer.api.*;
|
import the.bytecode.club.bytecodeviewer.api.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
** [Plugin Description Goes Here]
|
||||||
|
**
|
||||||
|
** @author [Your Name Goes Here]
|
||||||
|
**/
|
||||||
|
|
||||||
public class Template extends Plugin {
|
public class Template extends Plugin {
|
||||||
|
|
||||||
PluginConsole gui;
|
PluginConsole gui;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main function
|
* Execute function - this gets executed when the plugin is ran
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void execute(List<ClassNode> classNodeList) {
|
public void execute(List<ClassNode> classNodeList) {
|
||||||
// Create console
|
// Create & show the console
|
||||||
gui = new PluginConsole("Java Template");
|
gui = new PluginConsole("Java Template");
|
||||||
gui.setVisible(true); // Show the console
|
gui.setVisible(true);
|
||||||
|
|
||||||
// Debug text
|
// Print out to the console
|
||||||
out("Class Nodes: " + classNodeList.size());
|
print("Class Nodes: " + classNodeList.size());
|
||||||
|
|
||||||
// Iterate through each class node
|
// Iterate through each class node
|
||||||
for (ClassNode cn : classNodeList)
|
for (ClassNode cn : classNodeList)
|
||||||
process(cn);
|
processClassNode(cn);
|
||||||
|
|
||||||
BCV.hideFrame(gui, 10000); // Hides the console after 10 seconds
|
// Hide the console after 10 seconds
|
||||||
|
BCV.hideFrame(gui, 10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process each class node
|
* Process each class node
|
||||||
*/
|
*/
|
||||||
public void process(ClassNode cn) {
|
public void processClassNode(ClassNode cn) {
|
||||||
out("Node: " + cn.name + ".class");
|
print("Node: " + cn.name + ".class");
|
||||||
// TODO developer plugin code goes here
|
|
||||||
|
//TODO developer plugin code goes here
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print to console
|
* Print to console
|
||||||
*/
|
*/
|
||||||
public void out(String text) {
|
public void print(String text) {
|
||||||
gui.appendText(text);
|
gui.appendText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue