Interface ILabelManager


@Ser public interface ILabelManager
Definition of a code label manager. Labels are strings associated to a memory address.
  • Method Details

    • getPrimaryLabels

      Map<Long,String> getPrimaryLabels()
      Retrieve a copy of the primary labels map.
      Returns:
    • getLabel

      String getLabel(long address, long addressDelta, AutoLabelPolicy policy)
      Retrieve the label at a given memory address.
      Parameters:
      address -
      addressDelta -
      policy - determine whether a label should be -created and- returned if none was set
      Returns:
      a label or null
    • getLabel

      String getLabel(INativeMemoryItem item, long addressDelta, AutoLabelPolicy policy)
      Retrieve the label at the address of the provided memory item.
      Parameters:
      item -
      addressDelta -
      policy - determine whether a label should be -created and- returned if none was set
      Returns:
      a label or null
    • getAlternateLabels

      Collection<String> getAlternateLabels(long address)
      Get the alternate labels set at the provided address. The primary label is not provided.
      Parameters:
      address -
      Returns:
      a collection of labels, potentially null (never empty)
    • setLabel

      boolean setLabel(long address, String label, boolean allowAdjusting, boolean allowAlternates, boolean mustBePrimary)
      Attach a label at a given address.
      Parameters:
      address - memory address
      label - label string
      allowAdjusting - if true, the label will be adjusted if a conflict arises (eg, duplicate label, illegal label string)
      allowAlternates -
      mustBePrimary -
      Returns:
      success indicator
    • removeLabel

      boolean removeLabel(long address)
      Remove all the labels associated to the given address.
      Parameters:
      address -
      Returns:
      always true
    • resolveLabel

      Long resolveLabel(String label)
      Determine the memory address associated with the provided label.
      Parameters:
      label -
      Returns:
      the address, or null on error
    • isLegalLabel

      default boolean isLegalLabel(String label)
      Verify if the provided string is a legal label. Same as isLegalLabel(label, null, null).
      Parameters:
      label - non-null label to be tested
      Returns:
    • isLegalLabel

      boolean isLegalLabel(String label, Long address, StringBuilder legalized)
      Verify if the provided string is a legal label when used at the provided address.
      Parameters:
      label - non-null label to be tested
      address - optional address, null if none
      legalized - optional output buffer that will contain a legalized version of the input label, if the input label was illegal
      Returns: