Class MatchSetImpl

java.lang.Object
ghidra.feature.vt.api.impl.MatchSetImpl
All Implemented Interfaces:
VTMatchSet

public class MatchSetImpl extends Object implements VTMatchSet
  • Constructor Details

  • Method Details

    • addMatch

      public VTMatch addMatch(VTMatchInfo match)
      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:
      match - the info for the match to add to this match set.
      Returns:
      the new VTMatch that was added.
    • 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
    • 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.
    • 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.
    • 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(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:
    • 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:
    • 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.
    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object