Package ghidra.app.util.xml
Class XmlProgramOptions
java.lang.Object
ghidra.app.util.xml.XmlProgramOptions
A class to hold XML options.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
Used to signify that an existing program is being updated.static final long
Flag to indicate reading/writing instructionsstatic final long
Flag to indicate reading/writing commentsstatic final long
Flag to indicate reading/writing datastatic final long
Flag to indicate reading/writing empty program tree nodesstatic final long
Flag to indicate reading/writing equatesstatic final long
Flag to indicate reading/writing functionsstatic final long
Flag to indicate reading/writing memory blocksstatic final long
Flag to indicate reading/writing memory contentsstatic final long
Flag to indicate reading/writing propertiesstatic final long
Flag to indicate reading/writing referencesstatic final long
Flag to indicate reading/writing symbolsstatic final long
Flag to indicate reading/writing treesstatic final long
Used to signify that references should be overwritten when necessary.static final long
Used to signify that symbols should be overwritten when necessary. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetOptions
(boolean isAddToProgram) Returns an array of importer options representing the flags in this class.boolean
If true, then bookmarks should be read/written.boolean
If true, then comments should be read/written.boolean
isData()
If true, then data should be read/written.boolean
If true, then the entry points should be read/written.boolean
If true, then equates should be read/written.boolean
If true, then the external libraries should be read/written.boolean
If true, then functions should be read/written.boolean
If true, then instructions should be read/written.boolean
If true, then memory blocks should be read/written.boolean
If true, then memory contents should be read/written.boolean
If true, then bookmark conflicts will be overwritten.boolean
If true, then data conflicts will be overwritten.boolean
If true, then memory conflicts will be overwritten.boolean
If true, then property conflicts will be overwritten.boolean
If true, then reference conflicts will be overwritten.boolean
If true, then symbol conflicts will be overwritten.boolean
If true, then properties should be read/written.boolean
If true, then references (memory, stack, external) should be read/written.boolean
If true, then registers should be read/written.boolean
If true, then the relocation table should be read/written.boolean
If true, then symbols should be read/written.boolean
isTrees()
If true, then program trees should be read/written.void
setAddToProgram
(boolean addToProgram) void
setBookmarks
(boolean b) Sets bookmarks to be read/written.void
setComments
(boolean b) Sets comments to be read/written.void
setData
(boolean b) Sets data to be read/written.void
setEntryPoints
(boolean b) Sets entry points to be read/written.void
setEquates
(boolean b) Sets equates to be read/written.void
setExternalLibraries
(boolean b) Sets external libraries to be read/written.void
setFunctions
(boolean b) Sets functions to be read/written.void
setInstructions
(boolean b) Sets instructions to be read/written.void
setMemoryBlocks
(boolean b) Sets memory blocks to be read/written.void
setMemoryContents
(boolean b) Sets memory contents to be read/written.void
setOptions
(List<Option> options) Sets the options.void
setOverwriteBookmarkConflicts
(boolean b) Sets bookmark conflicts to always be overwritten.void
setOverwriteDataConflicts
(boolean b) Sets data conflicts to always be overwritten.void
setOverwriteMemoryConflicts
(boolean b) Sets memory conflicts to always be overwritten.void
setOverwritePropertyConflicts
(boolean b) Sets property conflicts to always be overwritten.void
setOverwriteReferenceConflicts
(boolean b) Sets reference conflicts to always be overwritten.void
setOverwriteSymbolConflicts
(boolean b) Sets symbol conflicts to always be overwritten.void
setProperties
(boolean b) Sets properties to be read/written.void
setReferences
(boolean b) Sets references to be read/written.void
setRegisters
(boolean b) Sets registers to be read/written.void
setRelocationTable
(boolean b) Sets relocation tables to be read/written.void
setSymbols
(boolean b) Sets symbols to be read/written.void
setTrees
(boolean b) Sets program trees to be read/written.
-
Field Details
-
OPT_MEMORY_BLOCKS
public static final long OPT_MEMORY_BLOCKSFlag to indicate reading/writing memory blocks- See Also:
-
OPT_MEMORY_CONTENTS
public static final long OPT_MEMORY_CONTENTSFlag to indicate reading/writing memory contents- See Also:
-
OPT_CODE
public static final long OPT_CODEFlag to indicate reading/writing instructions- See Also:
-
OPT_DATA
public static final long OPT_DATAFlag to indicate reading/writing data- See Also:
-
OPT_SYMBOLS
public static final long OPT_SYMBOLSFlag to indicate reading/writing symbols- See Also:
-
OPT_EQUATES
public static final long OPT_EQUATESFlag to indicate reading/writing equates- See Also:
-
OPT_COMMENTS
public static final long OPT_COMMENTSFlag to indicate reading/writing comments- See Also:
-
OPT_PROPERTIES
public static final long OPT_PROPERTIESFlag to indicate reading/writing properties- See Also:
-
OPT_TREES
public static final long OPT_TREESFlag to indicate reading/writing trees- See Also:
-
OPT_EMPTY_TREE_NODES
public static final long OPT_EMPTY_TREE_NODESFlag to indicate reading/writing empty program tree nodes- See Also:
-
OPT_REFERENCES
public static final long OPT_REFERENCESFlag to indicate reading/writing references- See Also:
-
OPT_FUNCTIONS
public static final long OPT_FUNCTIONSFlag to indicate reading/writing functions- See Also:
-
OVERWRITE_SYMBOLS
public static final long OVERWRITE_SYMBOLSUsed to signify that symbols should be overwritten when necessary. This value is not being included in theALL
constant.- See Also:
-
OVERWRITE_REFS
public static final long OVERWRITE_REFSUsed to signify that references should be overwritten when necessary. This value is not being included in theALL
constant.- See Also:
-
ADD_2_PROG
public static final long ADD_2_PROGUsed to signify that an existing program is being updated. This value is not being included in theALL
constant.- See Also:
-
-
Constructor Details
-
XmlProgramOptions
public XmlProgramOptions()
-
-
Method Details
-
getOptions
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
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)
-