Class VTMatchDB

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

public class VTMatchDB extends ghidra.program.database.DatabaseObject implements VTMatch
  • Field Details

    • lock

      protected ghidra.util.Lock lock
  • Constructor Details

    • VTMatchDB

      public VTMatchDB(ghidra.program.database.DBObjectCache<VTMatchDB> cache, db.DBRecord record, VTMatchSetDB matchSet)
  • Method Details

    • refresh

      protected boolean refresh()
      Specified by:
      refresh in class ghidra.program.database.DatabaseObject
    • refresh

      protected boolean refresh(db.DBRecord matchRecord)
      Overrides:
      refresh in class ghidra.program.database.DatabaseObject
    • getMatchSet

      public VTMatchSet getMatchSet()
      Description copied from interface: VTMatch
      returns the VTMatchSet that contains this match.
      Specified by:
      getMatchSet in interface VTMatch
      Returns:
      the VTMatchSet that contains this match.
    • getDestinationLength

      public int getDestinationLength()
      Description copied from interface: VTMatch
      Returns the length of the destination function or data.
      Specified by:
      getDestinationLength in interface VTMatch
      Returns:
      the length of the destination function or data.
    • getSimilarityScore

      public VTScore getSimilarityScore()
      Description copied from interface: VTMatch
      Returns a score that attempts to indicate how similar the associated items are to each other in a normalized score between 0 and 1. Note that short functions may have high similarity scores even though they are not really a match.
      Specified by:
      getSimilarityScore in interface VTMatch
      Returns:
      the score that attempts to indication how similar the items are.
    • getConfidenceScore

      public VTScore getConfidenceScore()
      Description copied from interface: VTMatch
      Returns a confidence score which is generally a combination of the similarity score and some measure of the length of the functions. Note that this score is not normalized and all that it indicates is that higher numbers are more likely to be correct than lower numbers. Comparing scores from different algorithms is meaningless.
      Specified by:
      getConfidenceScore in interface VTMatch
      Returns:
    • getLengthType

      public String getLengthType()
    • getSourceLength

      public int getSourceLength()
      Description copied from interface: VTMatch
      Returns the length of the source function or data.
      Specified by:
      getSourceLength in interface VTMatch
      Returns:
      the length of the source function or data.
    • getTag

      public VTMatchTag getTag()
      Description copied from interface: VTMatch
      Returns the tag that has been applied to this match or null if not tagged.
      Specified by:
      getTag in interface VTMatch
      Returns:
      the tag that has been applied to this match or null if not tagged.
    • setTag

      public void setTag(VTMatchTag tag)
      Description copied from interface: VTMatch
      Sets the tag for this match. Any previous tag is replaced. A value of null will remove any existing tag.
      Specified by:
      setTag in interface VTMatch
      Parameters:
      tag - the tag to set on this match.
    • getAssociation

      public VTAssociation getAssociation()
      Description copied from interface: VTMatch
      Returns the VTAssocation that this match is suggesting.
      Specified by:
      getAssociation in interface VTMatch
      Returns:
      the VTAssocation for this match.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getSourceAddress

      public ghidra.program.model.address.Address getSourceAddress()
      Description copied from interface: VTMatch
      Returns the address in the source program for a match.
      Specified by:
      getSourceAddress in interface VTMatch
      Returns:
      the address in the source program
    • getDestinationAddress

      public ghidra.program.model.address.Address getDestinationAddress()
      Description copied from interface: VTMatch
      Returns the address in the destination program for a match.
      Specified by:
      getDestinationAddress in interface VTMatch
      Returns:
      the address in the destination
    • toString

      public String toString()
      Overrides:
      toString in class Object