Class XmlProgramOptions

java.lang.Object
ghidra.app.util.xml.XmlProgramOptions

public class XmlProgramOptions extends Object
A class to hold XML options.
  • Field Details

    • OPT_MEMORY_BLOCKS

      public static final long OPT_MEMORY_BLOCKS
      Flag to indicate reading/writing memory blocks
      See Also:
    • OPT_MEMORY_CONTENTS

      public static final long OPT_MEMORY_CONTENTS
      Flag to indicate reading/writing memory contents
      See Also:
    • OPT_CODE

      public static final long OPT_CODE
      Flag to indicate reading/writing instructions
      See Also:
    • OPT_DATA

      public static final long OPT_DATA
      Flag to indicate reading/writing data
      See Also:
    • OPT_SYMBOLS

      public static final long OPT_SYMBOLS
      Flag to indicate reading/writing symbols
      See Also:
    • OPT_EQUATES

      public static final long OPT_EQUATES
      Flag to indicate reading/writing equates
      See Also:
    • OPT_COMMENTS

      public static final long OPT_COMMENTS
      Flag to indicate reading/writing comments
      See Also:
    • OPT_PROPERTIES

      public static final long OPT_PROPERTIES
      Flag to indicate reading/writing properties
      See Also:
    • OPT_TREES

      public static final long OPT_TREES
      Flag to indicate reading/writing trees
      See Also:
    • OPT_EMPTY_TREE_NODES

      public static final long OPT_EMPTY_TREE_NODES
      Flag to indicate reading/writing empty program tree nodes
      See Also:
    • OPT_REFERENCES

      public static final long OPT_REFERENCES
      Flag to indicate reading/writing references
      See Also:
    • OPT_FUNCTIONS

      public static final long OPT_FUNCTIONS
      Flag to indicate reading/writing functions
      See Also:
    • OVERWRITE_SYMBOLS

      public static final long OVERWRITE_SYMBOLS
      Used to signify that symbols should be overwritten when necessary. This value is not being included in the ALL constant.
      See Also:
    • OVERWRITE_REFS

      public static final long OVERWRITE_REFS
      Used to signify that references should be overwritten when necessary. This value is not being included in the ALL constant.
      See Also:
    • ADD_2_PROG

      public static final long ADD_2_PROG
      Used to signify that an existing program is being updated. This value is not being included in the ALL constant.
      See Also:
  • Constructor Details

    • XmlProgramOptions

      public XmlProgramOptions()
  • Method Details

    • getOptions

      public List<Option> getOptions(boolean isAddToProgram)
      Returns an array of importer options representing the flags in this class.
      Parameters:
      isAddToProgram - if true then adding to existing program
      Returns:
      the array of importer options
    • setOptions

      public void setOptions(List<Option> options) throws OptionException
      Sets the options. This method is not for defining the options, but rather for setting the values of options. If invalid options are passed in, then OptionException should be thrown.
      Parameters:
      options - the option values for XML
      Throws:
      OptionException - if invalid options are passed in
    • isInstructions

      public boolean isInstructions()
      If true, then instructions should be read/written.
      Returns:
      true if instructions should be read/written
    • isComments

      public boolean isComments()
      If true, then comments should be read/written.
      Returns:
      true if comments should be read/written
    • isData

      public boolean isData()
      If true, then data should be read/written.
      Returns:
      true if data should be read/written
    • isEquates

      public boolean isEquates()
      If true, then equates should be read/written.
      Returns:
      true if equates should be read/written
    • isFunctions

      public boolean isFunctions()
      If true, then functions should be read/written.
      Returns:
      true if functions should be read/written
    • isMemoryBlocks

      public boolean isMemoryBlocks()
      If true, then memory blocks should be read/written.
      Returns:
      true if memory blocks should be read/written
    • isMemoryContents

      public boolean isMemoryContents()
      If true, then memory contents should be read/written.
      Returns:
      true if memory contents should be read/written
    • isProperties

      public boolean isProperties()
      If true, then properties should be read/written.
      Returns:
      true if properties should be read/written
    • isReferences

      public boolean isReferences()
      If true, then references (memory, stack, external) should be read/written.
      Returns:
      true if references should be read/written
    • isSymbols

      public boolean isSymbols()
      If true, then symbols should be read/written.
      Returns:
      true if symbols should be read/written
    • isTrees

      public boolean isTrees()
      If true, then program trees should be read/written.
      Returns:
      true if program trees should be read/written
    • setInstructions

      public void setInstructions(boolean b)
      Sets instructions to be read/written.
      Parameters:
      b - true if instructions should read/written
    • setComments

      public void setComments(boolean b)
      Sets comments to be read/written.
      Parameters:
      b - true if comments should read/written
    • setData

      public void setData(boolean b)
      Sets data to be read/written.
      Parameters:
      b - true if data should read/written
    • setEquates

      public void setEquates(boolean b)
      Sets equates to be read/written.
      Parameters:
      b - true if equates should read/written
    • setFunctions

      public void setFunctions(boolean b)
      Sets functions to be read/written.
      Parameters:
      b - true if functions should read/written
    • setMemoryBlocks

      public void setMemoryBlocks(boolean b)
      Sets memory blocks to be read/written.
      Parameters:
      b - true if memory blocks should read/written
    • setMemoryContents

      public void setMemoryContents(boolean b)
      Sets memory contents to be read/written.
      Parameters:
      b - true if memory contents should read/written
    • setProperties

      public void setProperties(boolean b)
      Sets properties to be read/written.
      Parameters:
      b - true if properties should read/written
    • setReferences

      public void setReferences(boolean b)
      Sets references to be read/written.
      Parameters:
      b - true if references should read/written
    • setSymbols

      public void setSymbols(boolean b)
      Sets symbols to be read/written.
      Parameters:
      b - true if symbols should read/written
    • setTrees

      public void setTrees(boolean b)
      Sets program trees to be read/written.
      Parameters:
      b - true if program trees should read/written
    • isBookmarks

      public boolean isBookmarks()
      If true, then bookmarks should be read/written.
      Returns:
      true if bookmarks should be read/written
    • isRegisters

      public boolean isRegisters()
      If true, then registers should be read/written.
      Returns:
      true if registers should be read/written
    • isRelocationTable

      public boolean isRelocationTable()
      If true, then the relocation table should be read/written.
      Returns:
      true if the relocation table should be read/written
    • setBookmarks

      public void setBookmarks(boolean b)
      Sets bookmarks to be read/written.
      Parameters:
      b - true if bookmarks should read/written
    • setRegisters

      public void setRegisters(boolean b)
      Sets registers to be read/written.
      Parameters:
      b - true if registers should read/written
    • setRelocationTable

      public void setRelocationTable(boolean b)
      Sets relocation tables to be read/written.
      Parameters:
      b - true if relocation table should read/written
    • isEntryPoints

      public boolean isEntryPoints()
      If true, then the entry points should be read/written.
      Returns:
      true if the entry points should be read/written
    • isExternalLibraries

      public boolean isExternalLibraries()
      If true, then the external libraries should be read/written.
      Returns:
      true if the external libraries should be read/written
    • setEntryPoints

      public void setEntryPoints(boolean b)
      Sets entry points to be read/written.
      Parameters:
      b - true if entry points should read/written
    • setExternalLibraries

      public void setExternalLibraries(boolean b)
      Sets external libraries to be read/written.
      Parameters:
      b - true if external libraries should read/written
    • isOverwritePropertyConflicts

      public boolean isOverwritePropertyConflicts()
      If true, then property conflicts will be overwritten.
      Returns:
      true if property conflicts will be overwritten
    • isOverwriteBookmarkConflicts

      public boolean isOverwriteBookmarkConflicts()
      If true, then bookmark conflicts will be overwritten.
      Returns:
      true if bookmark conflicts will be overwritten
    • isOverwriteSymbolConflicts

      public boolean isOverwriteSymbolConflicts()
      If true, then symbol conflicts will be overwritten.
      Returns:
      true if symbol conflicts will be overwritten
    • isOverwriteReferenceConflicts

      public boolean isOverwriteReferenceConflicts()
      If true, then reference conflicts will be overwritten.
      Returns:
      true if reference conflicts will be overwritten
    • isOverwriteMemoryConflicts

      public boolean isOverwriteMemoryConflicts()
      If true, then memory conflicts will be overwritten.
      Returns:
      true if memory conflicts will be overwritten
    • isOverwriteDataConflicts

      public boolean isOverwriteDataConflicts()
      If true, then data conflicts will be overwritten.
      Returns:
      true if data conflicts will be overwritten
    • setOverwriteBookmarkConflicts

      public void setOverwriteBookmarkConflicts(boolean b)
      Sets bookmark conflicts to always be overwritten.
      Parameters:
      b - true if bookmark conflicts should always be overwritten
    • setOverwriteMemoryConflicts

      public void setOverwriteMemoryConflicts(boolean b)
      Sets memory conflicts to always be overwritten.
      Parameters:
      b - true if memory conflicts should always be overwritten
    • setOverwriteDataConflicts

      public void setOverwriteDataConflicts(boolean b)
      Sets data conflicts to always be overwritten.
      Parameters:
      b - true if data conflicts should always be overwritten
    • setOverwritePropertyConflicts

      public void setOverwritePropertyConflicts(boolean b)
      Sets property conflicts to always be overwritten.
      Parameters:
      b - true if property conflicts should always be overwritten
    • setOverwriteReferenceConflicts

      public void setOverwriteReferenceConflicts(boolean b)
      Sets reference conflicts to always be overwritten.
      Parameters:
      b - true if reference conflicts should always be overwritten
    • setOverwriteSymbolConflicts

      public void setOverwriteSymbolConflicts(boolean b)
      Sets symbol conflicts to always be overwritten.
      Parameters:
      b - true if symbol conflicts should always be overwritten
    • setAddToProgram

      public void setAddToProgram(boolean addToProgram)