diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/api/Plugin.java b/src/main/java/the/bytecode/club/bytecodeviewer/api/Plugin.java index 3831ff72..fb7d3610 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/api/Plugin.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/api/Plugin.java @@ -93,7 +93,7 @@ public abstract class Plugin extends Thread * On plugin start each resource container is iterated through, * then this is called with the resource container classes * - * @param classNodeList all of the loaded classes for easy access. + * @param classNodeList all the loaded classes for easy access. */ public abstract void execute(List classNodeList); } diff --git a/src/main/resources/templates/Template_Plugin.java b/src/main/resources/templates/Template_Plugin.java index 94d7359d..2a99b101 100644 --- a/src/main/resources/templates/Template_Plugin.java +++ b/src/main/resources/templates/Template_Plugin.java @@ -1,45 +1,43 @@ -import the.bytecode.club.bytecodeviewer.api.*; -import java.util.ArrayList; +import java.util.List; import org.objectweb.asm.tree.ClassNode; +import the.bytecode.club.bytecodeviewer.api.*; + +public class Template extends Plugin { -public class Template extends Plugin -{ PluginConsole gui; - + /** * Main function */ @Override - public void execute(ArrayList classNodeList) - { - //create console + public void execute(List classNodeList) { + // Create console gui = new PluginConsole("Java Template"); - gui.setVisible(true); //show the console - - //debug text + gui.setVisible(true); // Show the console + + // Debug text out("Class Nodes: " + classNodeList.size()); - - //iterate through each class node - for(ClassNode cn : classNodeList) + + // Iterate through each class node + for (ClassNode cn : classNodeList) process(cn); - - BCV.hideFrame(gui, 10000); //hides the console after 10 seconds + + BCV.hideFrame(gui, 10000); // Hides the console after 10 seconds } - + /** * Process each class node */ - public void process(ClassNode cn) - { + public void process(ClassNode cn) { out("Node: " + cn.name + ".class"); - //TODO developer plugin code goes here + // TODO developer plugin code goes here } - + /** * Print to console */ - public void out(String text) - { + public void out(String text) { gui.appendText(text); } -} \ No newline at end of file + +}