Package ghidra.framework.plugintool.util
Class PluginDescription
java.lang.Object
ghidra.framework.plugintool.util.PluginDescription
- All Implemented Interfaces:
Comparable<PluginDescription>
Class to hold meta information about a plugin, derived from meta-data attached to
each
Plugin
using a @PluginInfo
annotation.-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(PluginDescription other) static PluginDescription
createPluginDescription
(Class<?> pluginClass, PluginStatus status, String pluginPackage, String category, String shortDescription, String description) Deprecated.static PluginDescription
createPluginDescription
(Class<?> pluginClassParam, PluginStatus status, String pluginPackage, String category, String shortDescription, String description, boolean isSlowInstallation) Deprecated.boolean
Return the category for the plugin.Return the description of the plugin.List
<Class<? extends PluginEvent>> List
<Class<? extends PluginEvent>> Return the name of the module that contains the plugin.getName()
Return the name of the plugin.Return the class of the plugin.static PluginDescription
getPluginDescription
(Class<? extends Plugin> c) Fetches thePluginDescription
for the specified Plugin class.Set the short description for what the plugin does.Get the location for the source file for the plugin.Returns the development status of the plugin.int
hashCode()
boolean
isInCategory
(String parentCategory) Return whether the plugin is in the given category.boolean
Returns true if this plugin requires a noticeable amount of time to load when installed.toString()
-
Method Details
-
getPluginDescription
Fetches thePluginDescription
for the specified Plugin class.If the PluginDescription is found in the static cache, it is returned directly, otherwise a new instance is created (using annotation data attached to the Plugin class) and it is cached for later use.
- Parameters:
c
- Plugin's class- Returns:
PluginDescription
-
isSlowInstallation
public boolean isSlowInstallation()Returns true if this plugin requires a noticeable amount of time to load when installed.- Returns:
- true if this plugin requires a noticeable amount of time to load when installed.
-
getShortDescription
Set the short description for what the plugin does.- Returns:
- short description
-
getSourceLocation
Get the location for the source file for the plugin.- Returns:
- path to the source file
-
isInCategory
Return whether the plugin is in the given category.- Parameters:
parentCategory
- category to check- Returns:
- true if the plugin is in the category
-
getName
Return the name of the plugin.- Returns:
- the name of the plugin.
-
getModuleName
Return the name of the module that contains the plugin.- Returns:
- the module name
-
getPluginClass
Return the class of the plugin.- Returns:
- plugin class object
-
getDescription
Return the description of the plugin.- Returns:
"<None>"
if no description was specified
-
getCategory
Return the category for the plugin.- Returns:
- the category
-
getStatus
Returns the development status of the plugin.- Returns:
- the status.
-
getPluginPackage
-
getServicesRequired
-
getServicesProvided
-
getEventsConsumed
-
getEventsProduced
-
hashCode
public int hashCode() -
equals
-
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<PluginDescription>
-
createPluginDescription
@Deprecated public static PluginDescription createPluginDescription(Class<?> pluginClass, PluginStatus status, String pluginPackage, String category, String shortDescription, String description) Deprecated.Constructs a new PluginDescription for the given plugin class.Deprecated, use
@PluginInfo
instead.- Parameters:
pluginClass
- the class of the pluginstatus
- the status, UNSTABLE, STABLE, RELEASED, DEBUG, or EXAMPLEpluginPackage
- the package to which the plugin belongs (seePluginPackage
subclasses for examples)category
- the category to which the plugin belongs (seePluginCategoryNames
shortDescription
- a brief description of what the plugin doesdescription
- the long description of what the plugin does- Returns:
- the new (or cached) PluginDescription
-
createPluginDescription
@Deprecated public static PluginDescription createPluginDescription(Class<?> pluginClassParam, PluginStatus status, String pluginPackage, String category, String shortDescription, String description, boolean isSlowInstallation) Deprecated., use@PluginInfo
instead.Constructs a new PluginDescription for the given plugin class.- Parameters:
pluginClassParam
- the class of the pluginstatus
- the status, UNSTABLE, STABLE, RELEASED, DEBUG, or EXAMPLEpluginPackage
- the package to which the plugin belongs (seePluginPackage
subclasses for examples)category
- the category to which the plugin belongs (seePluginCategoryNames
shortDescription
- a brief description of what the plugin doesdescription
- the long description of what the plugin doesisSlowInstallation
- true signals that this plugin loads slowly- Returns:
- the new (or cached) PluginDescription
-
@PluginInfo
instead.