public interface

IPluginManager

com.pnfsoftware.jeb.core.IPluginManager

Class Overview

JEB plugin manager for external plugins running alongside the JEB back-end components. This manager handles:
- self-contained JAR plugins
- development plugins consisting of classfile(s)
- python script plugins (jython 2.7 scripts)

Refer to IPlugin.

Summary

Public Methods
abstract ClassLoader getClassloader()
Get the newest classloader used the plugin manager.
abstract IEnginesContext getEnginesContext()
Retrieve the engines context that instantiated this plugin manager.
abstract <T extends IPlugin> List<IPluginFileEntry<T>> getPluginEntries(Class<T> pluginClass)
Retrieve external plugin entries by type.
abstract <T extends IPlugin> List<T> getPlugins(Class<T> pluginClass)
Convenience method to retrieve external plugins by type.
abstract Class<? extends IPlugin> load(String classpath, String classname)
Load a JEB plugin.
abstract List<Class<? extends IPlugin>> load(File plugin)
Load a JEB plugin(s) contained in the provided JAR file.

Public Methods

public abstract ClassLoader getClassloader ()

Get the newest classloader used the plugin manager.

public abstract IEnginesContext getEnginesContext ()

Retrieve the engines context that instantiated this plugin manager.

public abstract List<IPluginFileEntry<T>> getPluginEntries (Class<T> pluginClass)

Retrieve external plugin entries by type. Hot-reloadable plugins, such as Java scripts and Python scripts, will be reloaded if a new version is detected.

The list of non-script plugins (i.e., jar-like) is being retrieved statically.
The list of script plugins (python, single Java files) is being regenerated with each call.

NOTE: this method is currently limited to decompiler optimizer plugins, that is, subclasses of IOptimizer (gendec plugins) and IDOptimizer (dexdec plugins).

Parameters
pluginClass plugin type
Returns
  • a list of plugin entries managed by this manager

public abstract List<T> getPlugins (Class<T> pluginClass)

Convenience method to retrieve external plugins by type. Shared plugin objects are retrieved. If fresh instances of plugin objects are necessary, use getPluginEntries(Class) instead.

The list of non-script plugins (i.e., jar-like) is being retrieved statically.
The list of script plugins (python, single Java files) is being regenerated with each call.

NOTE: this method is currently limited to decompiler optimizer plugins, that is, subclasses of IOptimizer (gendec plugins) and IDOptimizer (dexdec plugins).

Parameters
pluginClass plugin type (see limitations)
Returns
  • a list of plugins managed by this manager

public abstract Class<? extends IPlugin> load (String classpath, String classname)

Load a JEB plugin.

Parameters
classpath optional classpath, separated by the pathSeparatorChar
classname plugin classname
Returns
  • the loaded plugin class

public abstract List<Class<? extends IPlugin>> load (File plugin)

Load a JEB plugin(s) contained in the provided JAR file.

Parameters
plugin a JAR file
Returns
  • the list of loaded plugin classes