Package ghidra.app.util.exporter
Class AbstractLoaderExporter
java.lang.Object
ghidra.app.util.exporter.Exporter
ghidra.app.util.exporter.AbstractLoaderExporter
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
ElfExporter
,PeExporter
-
Field Summary
Fields inherited from class ghidra.app.util.exporter.Exporter
EMPTY_OPTIONS, log, provider
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractLoaderExporter
(String name, HelpLocation help) Creates a newAbstractLoaderExporter
-
Method Summary
Modifier and TypeMethodDescriptionboolean
export
(File file, DomainObject domainObj, AddressSetView addrSet, TaskMonitor monitor) Actually does the work of exporting the program.getOptions
(DomainObjectService domainObjectService) Returns the available options for this exporter.void
setOptions
(List<Option> options) Sets the options.protected abstract boolean
supportsFileFormat
(String fileFormat) Checks to see if the given file format is supported by this exporterMethods inherited from class ghidra.app.util.exporter.Exporter
canExportDomainObject, getDefaultFileExtension, getHelpLocation, getMessageLog, getName, setExporterServiceProvider, supportsPartialExport, toString
-
Constructor Details
-
AbstractLoaderExporter
Creates a newAbstractLoaderExporter
- Parameters:
name
- The display name of this exporterhelp
- TheHelpLocation
for this exporter
-
-
Method Details
-
supportsFileFormat
Checks to see if the given file format is supported by this exporter- Parameters:
fileFormat
- The file format (loader name) of the program to export- Returns:
- True if the given file format is supported by this exporter; otherwise, false
-
export
public boolean export(File file, DomainObject domainObj, AddressSetView addrSet, TaskMonitor monitor) throws IOException, ExporterException Description copied from class:Exporter
Actually does the work of exporting the program.- Specified by:
export
in classExporter
- Parameters:
file
- the output file to write the exported infodomainObj
- the domain object to exportaddrSet
- the address set if only a portion of the program should be exportedmonitor
- the task monitor- Returns:
- true if the program was successfully exported; otherwise, false. If the program was not successfully exported, the message log should be checked to find the source of the error.
- Throws:
IOException
ExporterException
-
getOptions
Description copied from class:Exporter
Returns the available options for this exporter. The program is needed because some exporters may have options that vary depending on the specific program being exported.- Specified by:
getOptions
in classExporter
- Parameters:
domainObjectService
- a service for retrieving the applicable domainObject.- Returns:
- the available options for this exporter
-
setOptions
Description copied from class:Exporter
Sets the options. This method is not for defining the options, but rather it is for setting the values of options. If invalid options are passed in, then OptionException should be thrown.- Specified by:
setOptions
in classExporter
- Parameters:
options
- the option values for this exporter
-