Class VTMatchSetDB

java.lang.Object
ghidra.program.database.DatabaseObject
ghidra.feature.vt.api.db.VTMatchSetDB
All Implemented Interfaces:
VTMatchSet

public class VTMatchSetDB extends ghidra.program.database.DatabaseObject implements VTMatchSet
  • 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

      public VTSession getSession()
      Description copied from interface: VTMatchSet
      Returns the VTSession that contains this match set.
      Specified by:
      getSession in interface VTMatchSet
      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 interface VTMatchSet
      Returns:
      the number of matches contained in this match set.
    • getProgramCorrelatorInfo

      public VTProgramCorrelatorInfo 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 interface VTMatchSet
      Returns:
      information about the program correlator that was used to generate the matches for this match set.
    • getSourceAddressSet

      public ghidra.program.model.address.AddressSet getSourceAddressSet() throws IOException
      Throws:
      IOException
    • getDestinationAddressSet

      public ghidra.program.model.address.AddressSet getDestinationAddressSet() throws IOException
      Throws:
      IOException
    • getProgramCorrelatorName

      public String getProgramCorrelatorName()
    • getProgramCorrelatorClassName

      public String getProgramCorrelatorClassName()
    • getOptions

      public ghidra.framework.options.Options getOptions()
    • addMatch

      public VTMatch addMatch(VTMatchInfo info)
      Description copied from interface: VTMatchSet
      Creates a match based on the given info and adds it to this match set.
      Specified by:
      addMatch in interface VTMatchSet
      Parameters:
      info - the info for the match to add to this match set.
      Returns:
      the new VTMatch that was added.
    • removeMatch

      public boolean removeMatch(VTMatch match)
      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 calling VTMatchSet.deleteMatch(VTMatch).

      Specified by:
      removeMatch in interface VTMatchSet
      Parameters:
      match - the match to remove.
      Returns:
      true if the match was removed.
      See Also:
    • deleteMatch

      public void deleteMatch(VTMatch match)
      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 interface VTMatchSet
      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 interface VTMatchSet
      Returns:
      the id
    • getMatches

      public Collection<VTMatch> getMatches()
      Description copied from interface: VTMatchSet
      Returns a collection of all VTMatches contained in this match set.
      Specified by:
      getMatches in interface VTMatchSet
      Returns:
      a collection of all VTMatches contained in this match set.
    • getMatches

      public Collection<VTMatch> getMatches(VTAssociation association)
      Description copied from interface: VTMatchSet
      Returns a collection of all matches for the given association.
      Specified by:
      getMatches in interface VTMatchSet
      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 calling VTMatchSet.getMatches(VTAssociation).
      Specified by:
      getMatches in interface VTMatchSet
      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 class ghidra.program.database.DatabaseObject
    • isInvalid

      public boolean isInvalid()
      Overrides:
      isInvalid in class ghidra.program.database.DatabaseObject
    • invalidateCache

      public void invalidateCache()
    • toString

      public String toString()
      Overrides:
      toString in class Object