Class PluginDescription

java.lang.Object
ghidra.framework.plugintool.util.PluginDescription
All Implemented Interfaces:
Comparable<PluginDescription>

public class PluginDescription extends Object implements Comparable<PluginDescription>
Class to hold meta information about a plugin, derived from meta-data attached to each Plugin using a @PluginInfo annotation.
  • Method Details

    • getPluginDescription

      public static PluginDescription getPluginDescription(Class<? extends Plugin> c)
      Fetches the PluginDescription 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

      public String getShortDescription()
      Set the short description for what the plugin does.
      Returns:
      short description
    • getSourceLocation

      public String getSourceLocation()
      Get the location for the source file for the plugin.
      Returns:
      path to the source file
    • isInCategory

      public boolean isInCategory(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 String getName()
      Return the name of the plugin.
      Returns:
      the name of the plugin.
    • getModuleName

      public String getModuleName()
      Return the name of the module that contains the plugin.
      Returns:
      the module name
    • getPluginClass

      public Class<? extends Plugin> getPluginClass()
      Return the class of the plugin.
      Returns:
      plugin class object
    • getDescription

      public String getDescription()
      Return the description of the plugin.
      Returns:
      "<None>" if no description was specified
    • getCategory

      public String getCategory()
      Return the category for the plugin.
      Returns:
      the category
    • getStatus

      public PluginStatus getStatus()
      Returns the development status of the plugin.
      Returns:
      the status.
    • getPluginPackage

      public PluginPackage getPluginPackage()
    • getServicesRequired

      public List<Class<?>> getServicesRequired()
    • getServicesProvided

      public List<Class<?>> getServicesProvided()
    • getEventsConsumed

      public List<Class<? extends PluginEvent>> getEventsConsumed()
    • getEventsProduced

      public List<Class<? extends PluginEvent>> getEventsProduced()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(PluginDescription other)
      Specified by:
      compareTo in interface Comparable<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 plugin
      status - the status, UNSTABLE, STABLE, RELEASED, DEBUG, or EXAMPLE
      pluginPackage - the package to which the plugin belongs (see PluginPackage subclasses for examples)
      category - the category to which the plugin belongs (see PluginCategoryNames
      shortDescription - a brief description of what the plugin does
      description - 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 plugin
      status - the status, UNSTABLE, STABLE, RELEASED, DEBUG, or EXAMPLE
      pluginPackage - the package to which the plugin belongs (see PluginPackage subclasses for examples)
      category - the category to which the plugin belongs (see PluginCategoryNames
      shortDescription - a brief description of what the plugin does
      description - the long description of what the plugin does
      isSlowInstallation - true signals that this plugin loads slowly
      Returns:
      the new (or cached) PluginDescription