Package ghidra.app.util.exporter
Class XmlExporter
java.lang.Object
ghidra.app.util.exporter.Exporter
ghidra.app.util.exporter.XmlExporter
- All Implemented Interfaces:
ExtensionPoint
An implementation of exporter that creates
an XML representation of the program.
-
Field Summary
Fields inherited from class ghidra.app.util.exporter.Exporter
EMPTY_OPTIONS, log, provider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanexport(File file, DomainObject domainObj, AddressSetView addrSet, TaskMonitor monitor) Actually does the work of exporting aDomainObject.getOptions(DomainObjectService domainObjectService) Returns the available options for this exporter.voidsetOptions(List<Option> options) Sets the options.Methods inherited from class ghidra.app.util.exporter.Exporter
canExportDomainFile, canExportDomainObject, canExportDomainObject, export, getDefaultFileExtension, getHelpLocation, getMessageLog, getName, setExporterServiceProvider, supportsAddressRestrictedExport, toString
-
Constructor Details
-
XmlExporter
public XmlExporter()Constructs a new XML exporter.
-
-
Method Details
-
getOptions
Description copied from class:ExporterReturns 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:
getOptionsin classExporter- Parameters:
domainObjectService- a service for retrieving the applicable domainObject.- Returns:
- the available options for this exporter
-
setOptions
Description copied from class:ExporterSets 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:
setOptionsin classExporter- Parameters:
options- the option values for this exporter- Throws:
OptionException- if invalid options are passed in
-
export
public boolean export(File file, DomainObject domainObj, AddressSetView addrSet, TaskMonitor monitor) throws IOException, ExporterException Description copied from class:ExporterActually does the work of exporting aDomainObject. Export will include all saved and unsaved modifications which may have been made to the object.- Specified by:
exportin 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 exported NOTE: seeExporter.supportsAddressRestrictedExport().monitor- 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- if an IO error occursExporterException- if export error occurs
-