Class AddressLabelInfo

java.lang.Object
ghidra.program.model.util.AddressLabelInfo
All Implemented Interfaces:
Comparable<AddressLabelInfo>

public class AddressLabelInfo extends Object implements Comparable<AddressLabelInfo>
AddressLabelInfo is a utility class for storing an Address and a corresponding label or alias together.
  • Constructor Details

    • AddressLabelInfo

      public AddressLabelInfo(Symbol s)
      Constructs a new AddressLabelInfo object
      Parameters:
      s - symbol to initialize info from.
    • AddressLabelInfo

      public AddressLabelInfo(Address addr, String label, boolean isPrimary, Namespace scope, SourceType symbolSource, boolean isEntry)
    • AddressLabelInfo

      public AddressLabelInfo(Address addr, String label, boolean isPrimary, Namespace scope, SourceType symbolSource, boolean isEntry, ProcessorSymbolType type)
    • AddressLabelInfo

      public AddressLabelInfo(Address addr, String label, boolean isPrimary, SourceType symbolSource)
    • AddressLabelInfo

      public AddressLabelInfo(Address addr)
      Constructs a new AddressLabelInfo object with only address information
      Parameters:
      addr - the address to store in this object
  • Method Details

    • getAddress

      public final Address getAddress()
      Returns the object's address.
    • getLabel

      public final String getLabel()
      Returns the object's label or alias.
    • isPrimary

      public final boolean isPrimary()
      Returns whether the object is the primary label at the address.
    • getScope

      public Namespace getScope()
      Returns the scope for the symbol.
    • getProcessorSymbolType

      public ProcessorSymbolType getProcessorSymbolType()
      Returns the type of processor symbol (if this was defined by a pspec) or null if this is not a processor symbol or it was not specified in the pspec file. It basically allows a pspec file to give more information about a symbol such as if code or a code pointer is expected to be at the symbol's address.
      Returns:
      the ProcesorSymbolType if it has one.
    • compareTo

      public int compareTo(AddressLabelInfo info)
      Specified by:
      compareTo in interface Comparable<AddressLabelInfo>
    • getSource

      public SourceType getSource()
    • isEntry

      public boolean isEntry()
    • toString

      public String toString()
      Overrides:
      toString in class Object