Class ExtensionDetails
java.lang.Object
ghidra.framework.plugintool.dialog.ExtensionDetails
- All Implemented Interfaces:
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(ExtensionDetails other) boolean
Returns the location where the extension archive is located.Returns the location where this extension is installed.getName()
int
hashCode()
boolean
An extension is known to be installed if it has a valid installation path AND that path contains a Module.manifest file.void
setArchivePath
(String path) void
void
setCreatedOn
(String date) void
setDescription
(String description) void
setInstallPath
(String path) void
void
setVersion
(String version)
-
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 nulldescription
- brief explanation of what the extension does; can be nullauthor
- creator of the extension; can be nullcreatedOn
- creation date of the extension, can be nullversion
- the extension version
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
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
-
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
-
getName
-
setName
-
getDescription
-
setDescription
-
getAuthor
-
setAuthor
-
getCreatedOn
-
setCreatedOn
-
getVersion
-
setVersion
-
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 theExtensionTableProvider
to remove the entire extension directory on the next launch.- Returns:
- true if the extension is installed.
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ExtensionDetails>
-