Package ghidra.app.util.exporter
Class IntelHexExporter
- java.lang.Object
-
- ghidra.app.util.exporter.Exporter
-
- ghidra.app.util.exporter.IntelHexExporter
-
- All Implemented Interfaces:
ExtensionPoint
public class IntelHexExporter extends Exporter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ghidra.util.classfinder.ExtensionPoint
ExtensionPoint.Exclude, ExtensionPoint.Util
-
-
Field Summary
Fields Modifier and Type Field Description protected static intMAX_BYTES_PER_LINEprotected Optionoption-
Fields inherited from class ghidra.app.util.exporter.Exporter
EMPTY_OPTIONS, log, provider
-
-
Constructor Summary
Constructors Modifier Constructor Description IntelHexExporter()Constructs a new Intel Hex exporter.protectedIntelHexExporter(java.lang.String name, java.lang.String extension, HelpLocation help)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<IntelHexRecord>dumpMemory(Program program, Memory memory, AddressSetView addrSetView, TaskMonitor monitor)booleanexport(java.io.File file, DomainObject domainObj, AddressSetView addrSet, TaskMonitor monitor)Actually does the work of exporting the program.java.util.List<Option>getOptions(DomainObjectService domainObjectService)Returns the available options for this exporter.voidsetOptions(java.util.List<Option> options)Sets the options.-
Methods inherited from class ghidra.app.util.exporter.Exporter
canExportDomainObject, getDefaultFileExtension, getHelpLocation, getMessageLog, getName, setExporterServiceProvider, supportsPartialExport, toString
-
-
-
-
Field Detail
-
MAX_BYTES_PER_LINE
protected static final int MAX_BYTES_PER_LINE
- See Also:
- Constant Field Values
-
option
protected Option option
-
-
Constructor Detail
-
IntelHexExporter
public IntelHexExporter()
Constructs a new Intel Hex exporter.
-
IntelHexExporter
protected IntelHexExporter(java.lang.String name, java.lang.String extension, HelpLocation help)
-
-
Method Detail
-
getOptions
public java.util.List<Option> getOptions(DomainObjectService domainObjectService)
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
public void setOptions(java.util.List<Option> options) throws OptionException
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(java.io.File file, DomainObject domainObj, AddressSetView addrSet, TaskMonitor monitor) throws java.io.IOException, ExporterExceptionDescription copied from class:ExporterActually does the work of exporting the program.- 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 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:
java.io.IOExceptionExporterException
-
dumpMemory
protected java.util.List<IntelHexRecord> dumpMemory(Program program, Memory memory, AddressSetView addrSetView, TaskMonitor monitor) throws MemoryAccessException
- Throws:
MemoryAccessException
-
-