Package ghidra.app.util.exporter

# Class AsciiExporter

java.lang.Object
ghidra.app.util.exporter.Exporter
ghidra.app.util.exporter.AsciiExporter

All Implemented Interfaces:
  `ExtensionPoint`

public class AsciiExporter extends Exporter
An implementation of exporter that creates an Ascii representation of the program.

- ## Field Summary

  ### Fields inherited from class ghidra.app.util.exporter.Exporter

  `EMPTY_OPTIONS, log, provider`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AsciiExporter()`
  Constructs a new Ascii exporter.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `export(File file, DomainObject domainObj, AddressSetView addressSet, TaskMonitor monitor)`
  Actually does the work of exporting a `DomainObject`.
  `List<Option>`
  `getOptions(DomainObjectService domainObjectService)`
  Returns the available options for this exporter.
  `void`
  `setOptions(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`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### AsciiExporter

    public AsciiExporter()
    Constructs a new Ascii exporter.

- ## Method Details

  - ### getOptions

    public List<Option> getOptions(DomainObjectService domainObjectService)
    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 class `Exporter`
    Parameters:
      `domainObjectService` - a service for retrieving the applicable domainObject.
    Returns:
      the available options for this exporter

  - ### setOptions

    public void setOptions(List<Option> options) throws OptionException
    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 class `Exporter`
    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 addressSet, TaskMonitor monitor) throws IOException
    Description copied from class: `Exporter`
    Actually does the work of exporting a `DomainObject`. Export will include all saved and unsaved modifications which may have been made to the object.
    Specified by:
      `export` in class `Exporter`
    Parameters:
      `file` - the output file to write the exported info
      `domainObj` - the domain object to export
      `addressSet` - the address set if only a portion of the program should be exported NOTE: see `Exporter.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 occurs