Package ghidra.app.util.xml
Class XmlProgramOptions
- java.lang.Object
-
- ghidra.app.util.xml.XmlProgramOptions
-
public class XmlProgramOptions extends java.lang.Object
A class to hold XML options.
-
-
Field Summary
Fields Modifier and Type Field Description static long
ADD_2_PROG
Used to signify that an existing program is being updated.static long
OPT_CODE
Flag to indicate reading/writing instructionsstatic long
OPT_COMMENTS
Flag to indicate reading/writing commentsstatic long
OPT_DATA
Flag to indicate reading/writing datastatic long
OPT_EMPTY_TREE_NODES
Flag to indicate reading/writing empty program tree nodesstatic long
OPT_EQUATES
Flag to indicate reading/writing equatesstatic long
OPT_FUNCTIONS
Flag to indicate reading/writing functionsstatic long
OPT_MEMORY_BLOCKS
Flag to indicate reading/writing memory blocksstatic long
OPT_MEMORY_CONTENTS
Flag to indicate reading/writing memory contentsstatic long
OPT_PROPERTIES
Flag to indicate reading/writing propertiesstatic long
OPT_REFERENCES
Flag to indicate reading/writing referencesstatic long
OPT_SYMBOLS
Flag to indicate reading/writing symbolsstatic long
OPT_TREES
Flag to indicate reading/writing treesstatic long
OVERWRITE_REFS
Used to signify that references should be overwritten when necessary.static long
OVERWRITE_SYMBOLS
Used to signify that symbols should be overwritten when necessary.
-
Constructor Summary
Constructors Constructor Description XmlProgramOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Option>
getOptions(boolean isAddToProgram)
Returns an array of importer options representing the flags in this class.boolean
isBookmarks()
If true, then bookmarks should be read/written.boolean
isComments()
If true, then comments should be read/written.boolean
isData()
If true, then data should be read/written.boolean
isEntryPoints()
If true, then the entry points should be read/written.boolean
isEquates()
If true, then equates should be read/written.boolean
isExternalLibraries()
If true, then the external libraries should be read/written.boolean
isFunctions()
If true, then functions should be read/written.boolean
isInstructions()
If true, then instructions should be read/written.boolean
isMemoryBlocks()
If true, then memory blocks should be read/written.boolean
isMemoryContents()
If true, then memory contents should be read/written.boolean
isOverwriteBookmarkConflicts()
If true, then bookmark conflicts will be overwritten.boolean
isOverwriteDataConflicts()
If true, then data conflicts will be overwritten.boolean
isOverwriteMemoryConflicts()
If true, then memory conflicts will be overwritten.boolean
isOverwritePropertyConflicts()
If true, then property conflicts will be overwritten.boolean
isOverwriteReferenceConflicts()
If true, then reference conflicts will be overwritten.boolean
isOverwriteSymbolConflicts()
If true, then symbol conflicts will be overwritten.boolean
isProperties()
If true, then properties should be read/written.boolean
isReferences()
If true, then references (memory, stack, external) should be read/written.boolean
isRegisters()
If true, then registers should be read/written.boolean
isRelocationTable()
If true, then the relocation table should be read/written.boolean
isSymbols()
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(java.util.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 Detail
-
OPT_MEMORY_BLOCKS
public static final long OPT_MEMORY_BLOCKS
Flag to indicate reading/writing memory blocks- See Also:
- Constant Field Values
-
OPT_MEMORY_CONTENTS
public static final long OPT_MEMORY_CONTENTS
Flag to indicate reading/writing memory contents- See Also:
- Constant Field Values
-
OPT_CODE
public static final long OPT_CODE
Flag to indicate reading/writing instructions- See Also:
- Constant Field Values
-
OPT_DATA
public static final long OPT_DATA
Flag to indicate reading/writing data- See Also:
- Constant Field Values
-
OPT_SYMBOLS
public static final long OPT_SYMBOLS
Flag to indicate reading/writing symbols- See Also:
- Constant Field Values
-
OPT_EQUATES
public static final long OPT_EQUATES
Flag to indicate reading/writing equates- See Also:
- Constant Field Values
-
OPT_COMMENTS
public static final long OPT_COMMENTS
Flag to indicate reading/writing comments- See Also:
- Constant Field Values
-
OPT_PROPERTIES
public static final long OPT_PROPERTIES
Flag to indicate reading/writing properties- See Also:
- Constant Field Values
-
OPT_TREES
public static final long OPT_TREES
Flag to indicate reading/writing trees- See Also:
- Constant Field Values
-
OPT_EMPTY_TREE_NODES
public static final long OPT_EMPTY_TREE_NODES
Flag to indicate reading/writing empty program tree nodes- See Also:
- Constant Field Values
-
OPT_REFERENCES
public static final long OPT_REFERENCES
Flag to indicate reading/writing references- See Also:
- Constant Field Values
-
OPT_FUNCTIONS
public static final long OPT_FUNCTIONS
Flag to indicate reading/writing functions- See Also:
- Constant Field Values
-
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 theALL
constant.- See Also:
- Constant Field Values
-
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 theALL
constant.- See Also:
- Constant Field Values
-
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 theALL
constant.- See Also:
- Constant Field Values
-
-
Method Detail
-
getOptions
public java.util.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(java.util.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)
-
-