Class ExtensionDetails
- java.lang.Object
-
- ghidra.framework.plugintool.dialog.ExtensionDetails
-
- All Implemented Interfaces:
java.lang.Comparable<ExtensionDetails>
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
nameattribute; all other fields are unimportant save for display purposes.
-
-
Constructor Summary
Constructors Constructor Description ExtensionDetails(java.lang.String name, java.lang.String description, java.lang.String author, java.lang.String createdOn, java.lang.String version)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(ExtensionDetails other)booleanequals(java.lang.Object obj)java.lang.StringgetArchivePath()Returns the location where the extension archive is located.java.lang.StringgetAuthor()java.lang.StringgetCreatedOn()java.lang.StringgetDescription()java.lang.StringgetInstallPath()Returns the location where this extension is installed.java.lang.StringgetName()java.lang.StringgetVersion()inthashCode()booleanisInstalled()An extension is known to be installed if it has a valid installation path AND that path contains a Module.manifest file.voidsetArchivePath(java.lang.String path)voidsetAuthor(java.lang.String author)voidsetCreatedOn(java.lang.String date)voidsetDescription(java.lang.String description)voidsetInstallPath(java.lang.String path)voidsetName(java.lang.String name)voidsetVersion(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)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 Detail
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.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.- Returns:
- 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.- Returns:
- 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 theExtensionTableProviderto remove the entire extension directory on the next launch.- Returns:
- true if the extension is installed.
-
compareTo
public int compareTo(ExtensionDetails other)
- Specified by:
compareToin interfacejava.lang.Comparable<ExtensionDetails>
-
-