Class ExtensionDetails

java.lang.Object
ghidra.framework.plugintool.dialog.ExtensionDetails
All Implemented Interfaces:
Comparable<ExtensionDetails>

public class ExtensionDetails extends Object implements Comparable<ExtensionDetails>
Representation of a Ghidra extension. This class encapsulates all information required to uniquely identify an extension and where (or if) it has been installed.

Note that hashCode and equals have been implemented for this. Two extension descriptions are considered equal if they have the same name attribute; all other fields are unimportant save for display purposes.

  • Constructor Details

    • ExtensionDetails

      public ExtensionDetails(String name, String description, String author, String createdOn, String version)
      Constructor.
      Parameters:
      name - unique name of the extension; cannot be null
      description - brief explanation of what the extension does; can be null
      author - creator of the extension; can be null
      createdOn - creation date of the extension, can be null
      version - the extension version
  • Method Details

    • hashCode

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

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

      public String getInstallPath()
      Returns the location where this extension is installed. If the extension is not installed this will be null.
      Returns:
      the extension path, or null
    • setInstallPath

      public void setInstallPath(String path)
    • getArchivePath

      public String getArchivePath()
      Returns the location where the extension archive is located. If there is no archive this will be null.
      Returns:
      the archive path, or null
    • setArchivePath

      public void setArchivePath(String path)
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description)
    • getAuthor

      public String getAuthor()
    • setAuthor

      public void setAuthor(String author)
    • getCreatedOn

      public String getCreatedOn()
    • setCreatedOn

      public void setCreatedOn(String date)
    • getVersion

      public String getVersion()
    • setVersion

      public void setVersion(String version)
    • isInstalled

      public boolean isInstalled()
      An extension is known to be installed if it has a valid installation path AND that path contains a Module.manifest file.

      Note: The module manifest file is a marker that indicates several things; one of which is the installation status of an extension. When a user marks an extension to be uninstalled (by checking the appropriate checkbox in the ExtensionTableModel), the only thing that is done is to remove this manifest file, which tells the ExtensionTableProvider to remove the entire extension directory on the next launch.

      Returns:
      true if the extension is installed.
    • compareTo

      public int compareTo(ExtensionDetails other)
      Specified by:
      compareTo in interface Comparable<ExtensionDetails>