Class VTMatchSetDB
- All Implemented Interfaces:
VTMatchSet
-
Field Summary
Fields inherited from class ghidra.program.database.DatabaseObject
key
-
Method Summary
Modifier and TypeMethodDescriptionaddMatch
(VTMatchInfo info) Creates a match based on the given info and adds it to this match set.static VTMatchSetDB
createMatchSetDB
(db.DBRecord record, VTSessionDB session, db.DBHandle dbHandle, ghidra.util.Lock lock) void
deleteMatch
(VTMatch match) Deletes the given match from this match set.ghidra.program.model.address.AddressSet
int
getID()
Returns a unique id for this match set.int
Returns the number of matches contained in this match set.Returns a collection of all VTMatches contained in this match set.getMatches
(VTAssociation association) Returns a collection of all matches for the given association.getMatches
(ghidra.program.model.address.Address sourceAddress, ghidra.program.model.address.Address destinationAddress) Returns a collection of matches for the given source and destination address.static VTMatchSetDB
getMatchSetDB
(db.DBRecord record, VTSessionDB session, db.DBHandle dbHandle, ghidra.framework.data.OpenMode openMode, ghidra.util.task.TaskMonitor monitor, ghidra.util.Lock lock) ghidra.framework.options.Options
Returns information about the program correlator that was used to generate the matches for this match set.Returns the VTSession that contains this match set.ghidra.program.model.address.AddressSet
void
boolean
protected boolean
refresh()
boolean
removeMatch
(VTMatch match) Removes a match from this match set.toString()
Methods inherited from class ghidra.program.database.DatabaseObject
checkDeleted, checkIsValid, checkIsValid, getKey, isDeleted, keyChanged, refresh, setDeleted, setInvalid, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ghidra.feature.vt.api.main.VTMatchSet
hasRemovableMatches
-
Method Details
-
createMatchSetDB
public static VTMatchSetDB createMatchSetDB(db.DBRecord record, VTSessionDB session, db.DBHandle dbHandle, ghidra.util.Lock lock) throws IOException - Throws:
IOException
-
getMatchSetDB
public static VTMatchSetDB getMatchSetDB(db.DBRecord record, VTSessionDB session, db.DBHandle dbHandle, ghidra.framework.data.OpenMode openMode, ghidra.util.task.TaskMonitor monitor, ghidra.util.Lock lock) throws ghidra.util.exception.VersionException - Throws:
ghidra.util.exception.VersionException
-
getSession
Description copied from interface:VTMatchSet
Returns the VTSession that contains this match set.- Specified by:
getSession
in interfaceVTMatchSet
- Returns:
- the VTSession that contains this match set.
-
getMatchCount
public int getMatchCount()Description copied from interface:VTMatchSet
Returns the number of matches contained in this match set.- Specified by:
getMatchCount
in interfaceVTMatchSet
- Returns:
- the number of matches contained in this match set.
-
getProgramCorrelatorInfo
Description copied from interface:VTMatchSet
Returns information about the program correlator that was used to generate the matches for this match set.- Specified by:
getProgramCorrelatorInfo
in interfaceVTMatchSet
- Returns:
- information about the program correlator that was used to generate the matches for this match set.
-
getSourceAddressSet
- Throws:
IOException
-
getDestinationAddressSet
- Throws:
IOException
-
getProgramCorrelatorName
-
getProgramCorrelatorClassName
-
getOptions
public ghidra.framework.options.Options getOptions() -
addMatch
Description copied from interface:VTMatchSet
Creates a match based on the given info and adds it to this match set.- Specified by:
addMatch
in interfaceVTMatchSet
- Parameters:
info
- the info for the match to add to this match set.- Returns:
- the new VTMatch that was added.
-
removeMatch
Description copied from interface:VTMatchSet
Removes a match from this match set.If this is the last match that shares the match's association, then the match will only be removed if the association is not accepted. In that case, no remove will take place and this method will return false.
Note: This method is deprecated. It unfortunately shares a very similar name with its replacement,
VTMatchSet.deleteMatch(VTMatch)
. The replacement method will delete the match and the related association and markup items in the database, if the match is the last match to use that association. This deprecated method does not remove the remaining association or markup items. Historically, this method has been called after clearing the given match and its markup. Once this method has been deleted, clients will be responsible for managing the markup item state before callingVTMatchSet.deleteMatch(VTMatch)
.- Specified by:
removeMatch
in interfaceVTMatchSet
- Parameters:
match
- the match to remove.- Returns:
- true if the match was removed.
- See Also:
-
deleteMatch
Description copied from interface:VTMatchSet
Deletes the given match from this match set.Note: deleting an ACCEPTED match removes potentially useful corroborating evidence from future correlation. Before deleting a match, consider instead filtering matches out of the UI that you are finished applying.
If this is the last match that shares the match's association, then the association will also be removed, along with any markup items in the database. Any applied markup item data will not be changed.
- Specified by:
deleteMatch
in interfaceVTMatchSet
- Parameters:
match
- the match
-
getID
public int getID()Description copied from interface:VTMatchSet
Returns a unique id for this match set. The ids are one-up numbers indicating the order this match set was generated in relation to other match sets in the VTSession.- Specified by:
getID
in interfaceVTMatchSet
- Returns:
- the id
-
getMatches
Description copied from interface:VTMatchSet
Returns a collection of all VTMatches contained in this match set.- Specified by:
getMatches
in interfaceVTMatchSet
- Returns:
- a collection of all VTMatches contained in this match set.
-
getMatches
Description copied from interface:VTMatchSet
Returns a collection of all matches for the given association.- Specified by:
getMatches
in interfaceVTMatchSet
- Parameters:
association
- the association for which to search for matches.- Returns:
- a collection of all matches for the given association.
- See Also:
-
getMatches
public Collection<VTMatch> getMatches(ghidra.program.model.address.Address sourceAddress, ghidra.program.model.address.Address destinationAddress) Description copied from interface:VTMatchSet
Returns a collection of matches for the given source and destination address. This is equivalent to callingVTMatchSet.getMatches(VTAssociation)
.- Specified by:
getMatches
in interfaceVTMatchSet
- Parameters:
sourceAddress
- The address in the source program for the association represented by the two given addresses.destinationAddress
- The address in the destination program for the association represented by the two given addresses.- Returns:
- a collection of all matches for the association represented by the given addresses
- See Also:
-
refresh
protected boolean refresh()- Specified by:
refresh
in classghidra.program.database.DatabaseObject
-
isInvalid
public boolean isInvalid()- Overrides:
isInvalid
in classghidra.program.database.DatabaseObject
-
invalidateCache
public void invalidateCache() -
toString
-