Package ghidra.feature.vt.api.util
Class EmptyVTSession
java.lang.Object
ghidra.feature.vt.api.util.EmptyVTSession
- All Implemented Interfaces:
db.util.ErrorHandler
,VTSession
,ghidra.framework.model.DomainObject
-
Field Summary
Fields inherited from interface ghidra.framework.model.DomainObject
DO_DOMAIN_FILE_CHANGED, DO_OBJECT_CLOSED, DO_OBJECT_ERROR, DO_OBJECT_RENAMED, DO_OBJECT_RESTORED, DO_OBJECT_SAVED, DO_PROPERTY_CHANGED, undoLock
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an Association hook that will be called whenever an association is accepted or cleared.void
addCloseListener
(ghidra.framework.model.DomainObjectClosedListener listener) boolean
addConsumer
(Object consumer) void
addDomainFileListener
(ghidra.framework.data.DomainObjectFileListener listener) void
addListener
(ghidra.framework.model.DomainObjectListener dol) Adds a DomainObjectListener to this VTSession.void
addSynchronizedDomainObject
(ghidra.framework.model.DomainObject domainObj) void
addTransactionListener
(ghidra.framework.model.TransactionListener listener) boolean
canLock()
boolean
canRedo()
boolean
canSave()
boolean
canUndo()
void
createMatchSet
(VTProgramCorrelator correlator) Creates a new VTMatchSet that will contain all the matches discovered by some ProgramCorrletor algorithm run.createMatchTag
(String name) Creates a new match tag with the given name.ghidra.framework.model.EventQueueID
createPrivateEventQueue
(ghidra.framework.model.DomainObjectListener listener, int maxDelay) void
void
deleteMatchTag
(VTMatchTag tag) Deletes the given VTMatchTag from this session.void
endTransaction
(int transactionID, boolean commit) void
void
flushPrivateEventQueue
(ghidra.framework.model.EventQueueID id) void
Returns the AssociationManager.ghidra.framework.model.TransactionInfo
ghidra.program.model.listing.Program
Returns the destination program associated with this VTSession.ghidra.framework.model.DomainFile
Returns the built-in VTMatchSet used to store implied VTMatches.Returns the built-in VTMatchSet used to store manually created VTMatches.getMatches
(VTAssociation association) Returns a list of all VTMatches for the given association.Returns a list of all VTMatchSets contained in this VTSessionReturns a set of all VTMatchTags in this session.long
getName()
Returns the name of this VTSessionghidra.framework.options.Options
getOptions
(String propertyListName) ghidra.program.model.listing.Program
Returns the source program associated with this VTSession.ghidra.framework.model.DomainObject[]
boolean
boolean
boolean
boolean
boolean
isClosed()
boolean
isLocked()
boolean
boolean
boolean
boolean
db.Transaction
openTransaction
(String description) void
redo()
void
void
void
Removes the given Association hook.void
removeCloseListener
(ghidra.framework.model.DomainObjectClosedListener listener) void
removeDomainFileListener
(ghidra.framework.data.DomainObjectFileListener listener) void
removeListener
(ghidra.framework.model.DomainObjectListener dol) Removes a DomainObjectListener from this VTSession.boolean
removePrivateEventQueue
(ghidra.framework.model.EventQueueID id) void
removeTransactionListener
(ghidra.framework.model.TransactionListener listener) void
save()
Saves this VTSession.void
void
saveToPackedFile
(File outputFile, ghidra.util.task.TaskMonitor monitor) void
setEventsEnabled
(boolean v) void
void
setTemporary
(boolean state) int
startTransaction
(String description) int
startTransaction
(String description, ghidra.framework.model.AbortedTransactionListener listener) void
undo()
void
unlock()
void
updateDestinationProgram
(ghidra.program.model.listing.Program newProgram) void
updateSourceProgram
(ghidra.program.model.listing.Program newProgram) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ghidra.framework.model.DomainObject
withTransaction, withTransaction
-
Constructor Details
-
EmptyVTSession
public EmptyVTSession()
-
-
Method Details
-
createMatchSet
Description copied from interface:VTSession
Creates a new VTMatchSet that will contain all the matches discovered by some ProgramCorrletor algorithm run.- Specified by:
createMatchSet
in interfaceVTSession
- Parameters:
correlator
- the VTProgramCorrelator used to generate this set of matches that will be added to this VTMatchSet.- Returns:
- A new VTMatchSet that can be used to store VTMatch objects.
-
getAssociationManager
Description copied from interface:VTSession
Returns the AssociationManager.- Specified by:
getAssociationManager
in interfaceVTSession
- Returns:
- the AssociationManager.
-
getDestinationProgram
public ghidra.program.model.listing.Program getDestinationProgram()Description copied from interface:VTSession
Returns the destination program associated with this VTSession.- Specified by:
getDestinationProgram
in interfaceVTSession
- Returns:
- the destination program associated with this VTSession.
-
getMatchSets
Description copied from interface:VTSession
Returns a list of all VTMatchSets contained in this VTSession- Specified by:
getMatchSets
in interfaceVTSession
- Returns:
- a list of all VTMatchSets contained in this VTSession
-
getName
Description copied from interface:VTSession
Returns the name of this VTSession -
getSourceProgram
public ghidra.program.model.listing.Program getSourceProgram()Description copied from interface:VTSession
Returns the source program associated with this VTSession.- Specified by:
getSourceProgram
in interfaceVTSession
- Returns:
- the source program associated with this VTSession.
-
save
Description copied from interface:VTSession
Saves this VTSession.- Specified by:
save
in interfaceVTSession
- Throws:
IOException
- if there is an exception saving
-
dbError
- Specified by:
dbError
in interfacedb.util.ErrorHandler
-
addListener
public void addListener(ghidra.framework.model.DomainObjectListener dol) Description copied from interface:VTSession
Adds a DomainObjectListener to this VTSession.- Specified by:
addListener
in interfaceghidra.framework.model.DomainObject
- Specified by:
addListener
in interfaceVTSession
- Parameters:
dol
- the listener to add.
-
removeListener
public void removeListener(ghidra.framework.model.DomainObjectListener dol) Description copied from interface:VTSession
Removes a DomainObjectListener from this VTSession.- Specified by:
removeListener
in interfaceghidra.framework.model.DomainObject
- Specified by:
removeListener
in interfaceVTSession
- Parameters:
dol
- the listener to remove.
-
addCloseListener
public void addCloseListener(ghidra.framework.model.DomainObjectClosedListener listener) - Specified by:
addCloseListener
in interfaceghidra.framework.model.DomainObject
-
removeCloseListener
public void removeCloseListener(ghidra.framework.model.DomainObjectClosedListener listener) - Specified by:
removeCloseListener
in interfaceghidra.framework.model.DomainObject
-
addDomainFileListener
public void addDomainFileListener(ghidra.framework.data.DomainObjectFileListener listener) - Specified by:
addDomainFileListener
in interfaceghidra.framework.model.DomainObject
-
removeDomainFileListener
public void removeDomainFileListener(ghidra.framework.data.DomainObjectFileListener listener) - Specified by:
removeDomainFileListener
in interfaceghidra.framework.model.DomainObject
-
createPrivateEventQueue
public ghidra.framework.model.EventQueueID createPrivateEventQueue(ghidra.framework.model.DomainObjectListener listener, int maxDelay) - Specified by:
createPrivateEventQueue
in interfaceghidra.framework.model.DomainObject
-
removePrivateEventQueue
public boolean removePrivateEventQueue(ghidra.framework.model.EventQueueID id) - Specified by:
removePrivateEventQueue
in interfaceghidra.framework.model.DomainObject
-
flushPrivateEventQueue
public void flushPrivateEventQueue(ghidra.framework.model.EventQueueID id) - Specified by:
flushPrivateEventQueue
in interfaceghidra.framework.model.DomainObject
-
createMatchTag
Description copied from interface:VTSession
Creates a new match tag with the given name.- Specified by:
createMatchTag
in interfaceVTSession
- Parameters:
name
- the name of the new tag to create.- Returns:
- the new VTMatchTag object.
-
deleteMatchTag
Description copied from interface:VTSession
Deletes the given VTMatchTag from this session.- Specified by:
deleteMatchTag
in interfaceVTSession
- Parameters:
tag
- the VTMatchTag to delete.
-
getMatchTags
Description copied from interface:VTSession
Returns a set of all VTMatchTags in this session.- Specified by:
getMatchTags
in interfaceVTSession
- Returns:
- a set of all VTMatchTags in this session.
-
getManualMatchSet
Description copied from interface:VTSession
Returns the built-in VTMatchSet used to store manually created VTMatches.- Specified by:
getManualMatchSet
in interfaceVTSession
- Returns:
- the built-in VTMatchSet used to store manually created VTMatches.
-
getImpliedMatchSet
Description copied from interface:VTSession
Returns the built-in VTMatchSet used to store implied VTMatches.- Specified by:
getImpliedMatchSet
in interfaceVTSession
- Returns:
- the built-in VTMatchSet used to store implied VTMatches.
-
getMatches
Description copied from interface:VTSession
Returns a list of all VTMatches for the given association.- Specified by:
getMatches
in interfaceVTSession
- Parameters:
association
- the VTAssociation for which to retrieve all VTMatches.- Returns:
- a list of all VTMatches for the given association.
-
addAssociationHook
Description copied from interface:VTSession
Adds an Association hook that will be called whenever an association is accepted or cleared.- Specified by:
addAssociationHook
in interfaceVTSession
- Parameters:
hook
- the callback hook.
-
removeAssociationHook
Description copied from interface:VTSession
Removes the given Association hook.- Specified by:
removeAssociationHook
in interfaceVTSession
- Parameters:
hook
- the callback hook to remove.
-
addSynchronizedDomainObject
public void addSynchronizedDomainObject(ghidra.framework.model.DomainObject domainObj) throws ghidra.framework.store.LockException - Specified by:
addSynchronizedDomainObject
in interfaceghidra.framework.model.DomainObject
- Throws:
ghidra.framework.store.LockException
-
endTransaction
public void endTransaction(int transactionID, boolean commit) - Specified by:
endTransaction
in interfaceghidra.framework.model.DomainObject
-
getCurrentTransactionInfo
public ghidra.framework.model.TransactionInfo getCurrentTransactionInfo()- Specified by:
getCurrentTransactionInfo
in interfaceghidra.framework.model.DomainObject
-
getSynchronizedDomainObjects
public ghidra.framework.model.DomainObject[] getSynchronizedDomainObjects()- Specified by:
getSynchronizedDomainObjects
in interfaceghidra.framework.model.DomainObject
-
hasTerminatedTransaction
public boolean hasTerminatedTransaction()- Specified by:
hasTerminatedTransaction
in interfaceghidra.framework.model.DomainObject
-
releaseSynchronizedDomainObject
public void releaseSynchronizedDomainObject() throws ghidra.framework.store.LockException- Specified by:
releaseSynchronizedDomainObject
in interfaceghidra.framework.model.DomainObject
- Throws:
ghidra.framework.store.LockException
-
openTransaction
- Specified by:
openTransaction
in interfaceghidra.framework.model.DomainObject
- Throws:
IllegalStateException
-
startTransaction
- Specified by:
startTransaction
in interfaceghidra.framework.model.DomainObject
-
startTransaction
public int startTransaction(String description, ghidra.framework.model.AbortedTransactionListener listener) - Specified by:
startTransaction
in interfaceghidra.framework.model.DomainObject
-
addConsumer
- Specified by:
addConsumer
in interfaceghidra.framework.model.DomainObject
-
canLock
public boolean canLock()- Specified by:
canLock
in interfaceghidra.framework.model.DomainObject
-
canSave
public boolean canSave()- Specified by:
canSave
in interfaceghidra.framework.model.DomainObject
-
flushEvents
public void flushEvents()- Specified by:
flushEvents
in interfaceghidra.framework.model.DomainObject
-
forceLock
- Specified by:
forceLock
in interfaceghidra.framework.model.DomainObject
-
getConsumerList
- Specified by:
getConsumerList
in interfaceghidra.framework.model.DomainObject
-
isUsedBy
- Specified by:
isUsedBy
in interfaceghidra.framework.model.DomainObject
-
getDescription
- Specified by:
getDescription
in interfaceghidra.framework.model.DomainObject
-
getDomainFile
public ghidra.framework.model.DomainFile getDomainFile()- Specified by:
getDomainFile
in interfaceghidra.framework.model.DomainObject
-
getMetadata
- Specified by:
getMetadata
in interfaceghidra.framework.model.DomainObject
-
getModificationNumber
public long getModificationNumber()- Specified by:
getModificationNumber
in interfaceghidra.framework.model.DomainObject
-
getOptions
- Specified by:
getOptions
in interfaceghidra.framework.model.DomainObject
-
getOptionsNames
- Specified by:
getOptionsNames
in interfaceghidra.framework.model.DomainObject
-
hasExclusiveAccess
public boolean hasExclusiveAccess()- Specified by:
hasExclusiveAccess
in interfaceghidra.framework.model.DomainObject
-
isChangeable
public boolean isChangeable()- Specified by:
isChangeable
in interfaceghidra.framework.model.DomainObject
-
isChanged
public boolean isChanged()- Specified by:
isChanged
in interfaceghidra.framework.model.DomainObject
-
isClosed
public boolean isClosed()- Specified by:
isClosed
in interfaceghidra.framework.model.DomainObject
-
isLocked
public boolean isLocked()- Specified by:
isLocked
in interfaceghidra.framework.model.DomainObject
-
isTemporary
public boolean isTemporary()- Specified by:
isTemporary
in interfaceghidra.framework.model.DomainObject
-
lock
- Specified by:
lock
in interfaceghidra.framework.model.DomainObject
-
release
- Specified by:
release
in interfaceghidra.framework.model.DomainObject
-
save
public void save(String comment, ghidra.util.task.TaskMonitor monitor) throws IOException, ghidra.util.exception.CancelledException - Specified by:
save
in interfaceghidra.framework.model.DomainObject
- Throws:
IOException
ghidra.util.exception.CancelledException
-
saveToPackedFile
public void saveToPackedFile(File outputFile, ghidra.util.task.TaskMonitor monitor) throws IOException, ghidra.util.exception.CancelledException - Specified by:
saveToPackedFile
in interfaceghidra.framework.model.DomainObject
- Throws:
IOException
ghidra.util.exception.CancelledException
-
setEventsEnabled
public void setEventsEnabled(boolean v) - Specified by:
setEventsEnabled
in interfaceghidra.framework.model.DomainObject
-
isSendingEvents
public boolean isSendingEvents()- Specified by:
isSendingEvents
in interfaceghidra.framework.model.DomainObject
-
setName
- Specified by:
setName
in interfaceghidra.framework.model.DomainObject
-
setTemporary
public void setTemporary(boolean state) - Specified by:
setTemporary
in interfaceghidra.framework.model.DomainObject
-
unlock
public void unlock()- Specified by:
unlock
in interfaceghidra.framework.model.DomainObject
-
addTransactionListener
public void addTransactionListener(ghidra.framework.model.TransactionListener listener) - Specified by:
addTransactionListener
in interfaceghidra.framework.model.DomainObject
-
canRedo
public boolean canRedo()- Specified by:
canRedo
in interfaceghidra.framework.model.DomainObject
-
canUndo
public boolean canUndo()- Specified by:
canUndo
in interfaceghidra.framework.model.DomainObject
-
clearUndo
public void clearUndo()- Specified by:
clearUndo
in interfaceghidra.framework.model.DomainObject
-
getRedoName
- Specified by:
getRedoName
in interfaceghidra.framework.model.DomainObject
-
getUndoName
- Specified by:
getUndoName
in interfaceghidra.framework.model.DomainObject
-
redo
- Specified by:
redo
in interfaceghidra.framework.model.DomainObject
- Throws:
IOException
-
getAllRedoNames
- Specified by:
getAllRedoNames
in interfaceghidra.framework.model.DomainObject
-
getAllUndoNames
- Specified by:
getAllUndoNames
in interfaceghidra.framework.model.DomainObject
-
removeTransactionListener
public void removeTransactionListener(ghidra.framework.model.TransactionListener listener) - Specified by:
removeTransactionListener
in interfaceghidra.framework.model.DomainObject
-
undo
- Specified by:
undo
in interfaceghidra.framework.model.DomainObject
- Throws:
IOException
-
updateDestinationProgram
public void updateDestinationProgram(ghidra.program.model.listing.Program newProgram) - Specified by:
updateDestinationProgram
in interfaceVTSession
-
updateSourceProgram
public void updateSourceProgram(ghidra.program.model.listing.Program newProgram) - Specified by:
updateSourceProgram
in interfaceVTSession
-