From 33447e3f0933f82fbc7958e6e2c71745d6bdbf33 Mon Sep 17 00:00:00 2001 From: Konloch Date: Sun, 27 Jun 2021 15:21:46 -0700 Subject: [PATCH] Example JS Plugin Print Classes --- plugins/example/ExamplePrintClassesPlugin.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 plugins/example/ExamplePrintClassesPlugin.js diff --git a/plugins/example/ExamplePrintClassesPlugin.js b/plugins/example/ExamplePrintClassesPlugin.js new file mode 100644 index 00000000..7bfb6e56 --- /dev/null +++ b/plugins/example/ExamplePrintClassesPlugin.js @@ -0,0 +1,18 @@ +/** + * This is an example plugin + */ + +var PluginConsole = Java.type("the.bytecode.club.bytecodeviewer.api.PluginConsole"); + +var gui = new PluginConsole("Example Plugin Print Loaded Classes"); + +function execute(classNodeList) +{ + for (index = 0; index < classNodeList.length; index++) + { + var cn = classNodeList[index]; + gui.appendText("Resource: " + cn.name + ".class"); + } + + gui.setVisible(true); +} \ No newline at end of file