Class MethodMatch

java.lang.Object
com.pnfsoftware.jeb.core.units.code.MethodMatch

@Ser public class MethodMatch extends Object
A method match, that can be attached to a ICodeMethod object, usually via its manager.

Example: for dex unit, use IDexUnit.setMethodMatch().

  • Constructor Details

    • MethodMatch

      public MethodMatch(String address, float score, int collId, String filetag, long creationtime)
      Create a method match.
      Parameters:
      address - method or routine address
      score - similarity score
      collId - collection id
      filetag - optional source tag
      creationtime - creation time in milliseconds since the unix epoch
  • Method Details

    • getAddress

      public String getAddress()
      Get the method or routine address.
      Returns:
      the method or routine address
    • getScore

      public double getScore()
      Get the similarity score.
      Returns:
      similarity score from 0.0 (worst) to 1.0 (best) between this signature and the target method it is applied to
    • getCollectionId

      public int getCollectionId()
      Get the collection id.
      Returns:
      collection id (reserved ids: 0=anonymous collection/no collection; 1=user collection)
    • getFileTag

      public String getFileTag()
      Get the optional source tag.
      Returns:
      optional tag indicating where the signature comes from (usually a file name); may be null
    • getCreationTime

      public long getCreationTime()
      Get the creation time.
      Returns:
      the unix timestamp (in ms) specifying the creation time of the signature
    • putData

      public Object putData(String key, Object value)
      Attach a non-null piece of transient data to this match object.
      Parameters:
      key - non-null key
      value - value to be attached, null to remove the entry
      Returns:
      previous value or null if none existed
    • getData

      public Object getData(String key)
      Retrieve a piece of data manually attached to this match object via putData(String, Object).
      Parameters:
      key - non-null key
      Returns:
      value or null
    • toString

      public String toString()
      Overrides:
      toString in class Object