Interface VTAssociation

All Known Implementing Classes:
VTAssociationDB

public interface VTAssociation
A VTAssociation is a possible equivalence between a function or data in one program to a function or data in another program. VTAssociations can be "Accepted" indicating that the user has agreed that the association is correct.
  • Method Details

    • getType

      Returns the type of the association. Either Function or Data.
      Returns:
      the type of the association. Either Function or Data.
    • getSession

      VTSession getSession()
      Returns the VTSession that this association belongs to.
      Returns:
      the VTSession that this association belongs to.
    • getMarkupItems

      Collection<VTMarkupItem> getMarkupItems(ghidra.util.task.TaskMonitor monitor) throws ghidra.util.exception.CancelledException
      Returns a list of markup items for this association.
      Parameters:
      monitor - a task monitor used to monitor and control this operation.
      Returns:
      a list of markup items for this association.
      Throws:
      ghidra.util.exception.CancelledException - if the operation was cancelled via the monitor.
    • hasAppliedMarkupItems

      boolean hasAppliedMarkupItems()
      Returns true if this association is accepted and has one or more markup items that have been applied.
      Returns:
      true if this association is accepted and has one or more markup items that have been applied.
    • getSourceAddress

      ghidra.program.model.address.Address getSourceAddress()
      Returns the address of the function or data item in the source program for this association.
      Returns:
      the address of the function or data item in the source program for this association.
    • getDestinationAddress

      ghidra.program.model.address.Address getDestinationAddress()
      Returns the address of the function or data item in the source program for this association.
      Returns:
      the address of the function or data item in the source program for this association.
    • getRelatedAssociations

      Collection<VTAssociation> getRelatedAssociations()
      Returns a collection of VTAssociations that have either the same source address or the same destination address.
      Returns:
      a collection of VTAssociations that have either the same source address or the same destination address.
    • setMarkupStatus

      void setMarkupStatus(VTAssociationMarkupStatus markupItemsStatus)
      Sets the markup status of this association. This method is used by the VTAssociationManager to update the association with information about the state of its markup items.
      Parameters:
      markupItemsStatus - the markup items
    • getMarkupStatus

      VTAssociationMarkupStatus getMarkupStatus()
      Returns the status of the markup items for this association. See VTAssociationMarkupStatus for details.
      Returns:
      the status of the markup items for this association.
    • getStatus

      VTAssociationStatus getStatus()
      Returns the current status of this association. One of AVAILABLE, ACCEPTED, BLOCKED, or REJECTED. See VTAssociationStatus for details.
      Returns:
      the current status of this association. One of AVAILABLE, ACCEPTED, BLOCKED, or REJECTED.
    • setAccepted

      void setAccepted() throws VTAssociationStatusException
      A convenience method to accept the given association without actually performing an apply.
      Throws:
      VTAssociationStatusException - if the given association is VTAssociationStatus.BLOCKED
    • clearStatus

      void clearStatus() throws VTAssociationStatusException
      Clears the state of the given association from VTAssociationStatus.ACCEPTED or VTAssociationStatus.REJECTED to VTAssociationStatus.AVAILABLE. This method will throw an exception if called while the given assocation's markup items have been applied. That is, you must first unapply any applied markup items before calling this method.
      Throws:
      VTAssociationStatusException - if the given association's status is not VTAssociationStatus.ACCEPTED/VTAssociationStatus.REJECTED or if the given assocation's markup item manager contains markup items that have been applied.
    • setRejected

      void setRejected() throws VTAssociationStatusException
      Sets the status of this association to VTAssociationStatus.REJECTED.
      Throws:
      VTAssociationStatusException - if the association is accepted.
    • getVoteCount

      int getVoteCount()
      Returns the current vote count which is an application settable field which should generally be used to indicate a number of supporting facts. For example, other accepted associations may have matching call references to this association, each of those matching calls should have incremented the votes.
      Returns:
      the current number of facts that support this association
    • setVoteCount

      void setVoteCount(int voteCount)
      Sets the vote count for this association which should be used to indicate the number of supporting facts for this association
      Parameters:
      voteCount - the new vote count for this association.