Package ghidra.app.util.xml
Class XmlProgramOptions
- java.lang.Object
-
- ghidra.app.util.xml.XmlProgramOptions
-
public class XmlProgramOptions extends java.lang.ObjectA class to hold XML options.
-
-
Field Summary
Fields Modifier and Type Field Description static longADD_2_PROGUsed to signify that an existing program is being updated.static longOPT_CODEFlag to indicate reading/writing instructionsstatic longOPT_COMMENTSFlag to indicate reading/writing commentsstatic longOPT_DATAFlag to indicate reading/writing datastatic longOPT_EMPTY_TREE_NODESFlag to indicate reading/writing empty program tree nodesstatic longOPT_EQUATESFlag to indicate reading/writing equatesstatic longOPT_FUNCTIONSFlag to indicate reading/writing functionsstatic longOPT_MEMORY_BLOCKSFlag to indicate reading/writing memory blocksstatic longOPT_MEMORY_CONTENTSFlag to indicate reading/writing memory contentsstatic longOPT_PROPERTIESFlag to indicate reading/writing propertiesstatic longOPT_REFERENCESFlag to indicate reading/writing referencesstatic longOPT_SYMBOLSFlag to indicate reading/writing symbolsstatic longOPT_TREESFlag to indicate reading/writing treesstatic longOVERWRITE_REFSUsed to signify that references should be overwritten when necessary.static longOVERWRITE_SYMBOLSUsed 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.booleanisBookmarks()If true, then bookmarks should be read/written.booleanisComments()If true, then comments should be read/written.booleanisData()If true, then data should be read/written.booleanisEntryPoints()If true, then the entry points should be read/written.booleanisEquates()If true, then equates should be read/written.booleanisExternalLibraries()If true, then the external libraries should be read/written.booleanisFunctions()If true, then functions should be read/written.booleanisInstructions()If true, then instructions should be read/written.booleanisMemoryBlocks()If true, then memory blocks should be read/written.booleanisMemoryContents()If true, then memory contents should be read/written.booleanisOverwriteBookmarkConflicts()If true, then bookmark conflicts will be overwritten.booleanisOverwriteDataConflicts()If true, then data conflicts will be overwritten.booleanisOverwriteMemoryConflicts()If true, then memory conflicts will be overwritten.booleanisOverwritePropertyConflicts()If true, then property conflicts will be overwritten.booleanisOverwriteReferenceConflicts()If true, then reference conflicts will be overwritten.booleanisOverwriteSymbolConflicts()If true, then symbol conflicts will be overwritten.booleanisProperties()If true, then properties should be read/written.booleanisReferences()If true, then references (memory, stack, external) should be read/written.booleanisRegisters()If true, then registers should be read/written.booleanisRelocationTable()If true, then the relocation table should be read/written.booleanisSymbols()If true, then symbols should be read/written.booleanisTrees()If true, then program trees should be read/written.voidsetAddToProgram(boolean addToProgram)voidsetBookmarks(boolean b)Sets bookmarks to be read/written.voidsetComments(boolean b)Sets comments to be read/written.voidsetData(boolean b)Sets data to be read/written.voidsetEntryPoints(boolean b)Sets entry points to be read/written.voidsetEquates(boolean b)Sets equates to be read/written.voidsetExternalLibraries(boolean b)Sets external libraries to be read/written.voidsetFunctions(boolean b)Sets functions to be read/written.voidsetInstructions(boolean b)Sets instructions to be read/written.voidsetMemoryBlocks(boolean b)Sets memory blocks to be read/written.voidsetMemoryContents(boolean b)Sets memory contents to be read/written.voidsetOptions(java.util.List<Option> options)Sets the options.voidsetOverwriteBookmarkConflicts(boolean b)Sets bookmark conflicts to always be overwritten.voidsetOverwriteDataConflicts(boolean b)Sets data conflicts to always be overwritten.voidsetOverwriteMemoryConflicts(boolean b)Sets memory conflicts to always be overwritten.voidsetOverwritePropertyConflicts(boolean b)Sets property conflicts to always be overwritten.voidsetOverwriteReferenceConflicts(boolean b)Sets reference conflicts to always be overwritten.voidsetOverwriteSymbolConflicts(boolean b)Sets symbol conflicts to always be overwritten.voidsetProperties(boolean b)Sets properties to be read/written.voidsetReferences(boolean b)Sets references to be read/written.voidsetRegisters(boolean b)Sets registers to be read/written.voidsetRelocationTable(boolean b)Sets relocation tables to be read/written.voidsetSymbols(boolean b)Sets symbols to be read/written.voidsetTrees(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 theALLconstant.- 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 theALLconstant.- 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 theALLconstant.- 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)
-
-