Package ghidra.framework.plugintool.util
Class PluginDescription
- java.lang.Object
-
- ghidra.framework.plugintool.util.PluginDescription
-
- All Implemented Interfaces:
java.lang.Comparable<PluginDescription>
public class PluginDescription extends java.lang.Object implements java.lang.Comparable<PluginDescription>
Class to hold meta information about a plugin, derived from meta-data attached to eachPluginusing a@PluginInfoannotation.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intcompareTo(PluginDescription other)static PluginDescriptioncreatePluginDescription(java.lang.Class<?> pluginClass, PluginStatus status, java.lang.String pluginPackage, java.lang.String category, java.lang.String shortDescription, java.lang.String description)Deprecated.static PluginDescriptioncreatePluginDescription(java.lang.Class<?> pluginClassParam, PluginStatus status, java.lang.String pluginPackage, java.lang.String category, java.lang.String shortDescription, java.lang.String description, boolean isSlowInstallation)Deprecated.booleanequals(java.lang.Object obj)java.lang.StringgetCategory()Return the category for the plugin.java.lang.StringgetDescription()Return the description of the plugin.java.util.List<java.lang.Class<? extends PluginEvent>>getEventsConsumed()java.util.List<java.lang.Class<? extends PluginEvent>>getEventsProduced()java.lang.StringgetModuleName()Return the type for the plugin: CORE, CONTRIB, PROTOTYPE, or DEVELOP.java.lang.StringgetName()Return the name of the plugin.java.lang.Class<? extends Plugin>getPluginClass()Return the class of the plugin.static PluginDescriptiongetPluginDescription(java.lang.Class<? extends Plugin> c)Fetches thePluginDescriptionfor the specified Plugin class.PluginPackagegetPluginPackage()java.util.List<java.lang.Class<?>>getServicesProvided()java.util.List<java.lang.Class<?>>getServicesRequired()java.lang.StringgetShortDescription()Set the short description for what the plugin does.java.lang.StringgetSourceLocation()Get the location for the source file for the plugin.PluginStatusgetStatus()Returns the development status of the plugin.inthashCode()booleanisInCategory(java.lang.String parentCategory)Return whether the plugin is in the given category.booleanisSlowInstallation()Returns true if this plugin requires a noticeable amount of time to load when installed.java.lang.StringtoString()
-
-
-
Method Detail
-
getPluginDescription
public static PluginDescription getPluginDescription(java.lang.Class<? extends Plugin> c)
Fetches thePluginDescriptionfor 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:
-
getShortDescription
public java.lang.String getShortDescription()
Set the short description for what the plugin does.- Returns:
- short description
-
getSourceLocation
public java.lang.String getSourceLocation()
Get the location for the source file for the plugin.- Returns:
- path to the source file
-
isInCategory
public boolean isInCategory(java.lang.String parentCategory)
Return whether the plugin is in the given category.- Parameters:
parentCategory- category to check- Returns:
- true if the plugin is in the category
-
getName
public java.lang.String getName()
Return the name of the plugin.
-
getModuleName
public java.lang.String getModuleName()
Return the type for the plugin: CORE, CONTRIB, PROTOTYPE, or DEVELOP. Within a type, plugins are grouped by category.- Returns:
- the type (or null if there is no module)
-
getPluginClass
public java.lang.Class<? extends Plugin> getPluginClass()
Return the class of the plugin.- Returns:
- plugin class object
-
getDescription
public java.lang.String getDescription()
Return the description of the plugin.- Returns:
- "
" if no description was specified
-
getCategory
public java.lang.String getCategory()
Return the category for the plugin.- Returns:
- the category
-
getStatus
public PluginStatus getStatus()
Returns the development status of the plugin.
-
getPluginPackage
public PluginPackage getPluginPackage()
-
getServicesRequired
public java.util.List<java.lang.Class<?>> getServicesRequired()
-
getServicesProvided
public java.util.List<java.lang.Class<?>> getServicesProvided()
-
getEventsConsumed
public java.util.List<java.lang.Class<? extends PluginEvent>> getEventsConsumed()
-
getEventsProduced
public java.util.List<java.lang.Class<? extends PluginEvent>> getEventsProduced()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
compareTo
public int compareTo(PluginDescription other)
- Specified by:
compareToin interfacejava.lang.Comparable<PluginDescription>
-
createPluginDescription
@Deprecated public static PluginDescription createPluginDescription(java.lang.Class<?> pluginClass, PluginStatus status, java.lang.String pluginPackage, java.lang.String category, java.lang.String shortDescription, java.lang.String description)
Deprecated.Constructs a new PluginDescription for the given plugin class.Deprecated, use
@PluginInfoinstead.- Parameters:
pluginClass- the class of the pluginstatus- the status, UNSTABLE, STABLE, RELEASED, DEBUG, or EXAMPLEpluginPackage- the package to which the plugin belongs (seePluginPackagesubclasses for examples)category- the category to which the plugin belongs (seePluginCategoryNamesshortDescription- 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(java.lang.Class<?> pluginClassParam, PluginStatus status, java.lang.String pluginPackage, java.lang.String category, java.lang.String shortDescription, java.lang.String description, boolean isSlowInstallation)
Deprecated.Constructs a new PluginDescription for the given plugin class.Deprecated, use
@PluginInfoinstead.- Parameters:
pluginClass- the class of the pluginstatus- the status, UNSTABLE, STABLE, RELEASED, DEBUG, or EXAMPLEpluginPackage- the package to which the plugin belongs (seePluginPackagesubclasses for examples)category- the category to which the plugin belongs (seePluginCategoryNamesshortDescription- 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
-
-