Class ExtensionDetails

  • All Implemented Interfaces:

    public class ExtensionDetails
    extends java.lang.Object
    implements java.lang.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 Summary

      Constructor Description
      ExtensionDetails​(java.lang.String name, java.lang.String description, java.lang.String author, java.lang.String createdOn, java.lang.String version)
    • Constructor Detail

      • ExtensionDetails

        public ExtensionDetails​(java.lang.String name,
                                java.lang.String description,
                                java.lang.String author,
                                java.lang.String createdOn,
                                java.lang.String version)
        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 Detail

      • hashCode

        public int hashCode()
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        equals in class java.lang.Object
      • getInstallPath

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

        public void setInstallPath​(java.lang.String path)
      • getArchivePath

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

        public void setArchivePath​(java.lang.String path)
      • getName

        public java.lang.String getName()
      • setName

        public void setName​(java.lang.String name)
      • getDescription

        public java.lang.String getDescription()
      • setDescription

        public void setDescription​(java.lang.String description)
      • getAuthor

        public java.lang.String getAuthor()
      • setAuthor

        public void setAuthor​(java.lang.String author)
      • getCreatedOn

        public java.lang.String getCreatedOn()
      • setCreatedOn

        public void setCreatedOn​(java.lang.String date)
      • getVersion

        public java.lang.String getVersion()
      • setVersion

        public void setVersion​(java.lang.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.

        true if the extension is installed.