Package ghidra.feature.vt.api.db
Class VTMatchDB
java.lang.Object
ghidra.program.database.DatabaseObject
ghidra.feature.vt.api.db.VTMatchDB
- All Implemented Interfaces:
VTMatch
-
Field Summary
Fields inherited from class ghidra.program.database.DatabaseObject
key
Fields inherited from interface ghidra.feature.vt.api.main.VTMatch
AL_LINES_LENGTH_TYPE, BYTES_LENGTH_TYPE, INSTRUCTIONS_LENGTH_TYPE
-
Constructor Summary
ConstructorDescriptionVTMatchDB
(ghidra.program.database.DBObjectCache<VTMatchDB> cache, db.DBRecord record, VTMatchSetDB matchSet) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the VTAssocation that this match is suggesting.Returns a confidence score which is generally a combination of the similarity score and some measure of the length of the functions.ghidra.program.model.address.Address
Returns the address in the destination program for a match.int
Returns the length of the destination function or data.returns the VTMatchSet that contains this match.Returns a score that attempts to indicate how similar the associated items are to each other in a normalized score between 0 and 1.ghidra.program.model.address.Address
Returns the address in the source program for a match.int
Returns the length of the source function or data.getTag()
Returns the tag that has been applied to this match or null if not tagged.int
hashCode()
protected boolean
refresh()
protected boolean
refresh
(db.DBRecord matchRecord) void
setTag
(VTMatchTag tag) Sets the tag for this match.toString()
Methods inherited from class ghidra.program.database.DatabaseObject
checkDeleted, checkIsValid, checkIsValid, getKey, isDeleted, isInvalid, keyChanged, setDeleted, setInvalid, validate
-
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 classghidra.program.database.DatabaseObject
-
refresh
protected boolean refresh(db.DBRecord matchRecord) - Overrides:
refresh
in classghidra.program.database.DatabaseObject
-
getMatchSet
Description copied from interface:VTMatch
returns the VTMatchSet that contains this match.- Specified by:
getMatchSet
in interfaceVTMatch
- 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 interfaceVTMatch
- Returns:
- the length of the destination function or data.
-
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 interfaceVTMatch
- Returns:
- the score that attempts to indication how similar the items are.
-
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 interfaceVTMatch
- Returns:
-
getLengthType
-
getSourceLength
public int getSourceLength()Description copied from interface:VTMatch
Returns the length of the source function or data.- Specified by:
getSourceLength
in interfaceVTMatch
- Returns:
- the length of the source function or data.
-
getTag
Description copied from interface:VTMatch
Returns the tag that has been applied to this match or null if not tagged. -
setTag
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. -
getAssociation
Description copied from interface:VTMatch
Returns the VTAssocation that this match is suggesting.- Specified by:
getAssociation
in interfaceVTMatch
- Returns:
- the VTAssocation for this match.
-
hashCode
public int hashCode() -
equals
-
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 interfaceVTMatch
- 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 interfaceVTMatch
- Returns:
- the address in the destination
-
toString
-