Package ghidra.program.model.util
Class AddressLabelInfo
- java.lang.Object
-
- ghidra.program.model.util.AddressLabelInfo
-
- All Implemented Interfaces:
java.lang.Comparable<AddressLabelInfo>
public class AddressLabelInfo extends java.lang.Object implements java.lang.Comparable<AddressLabelInfo>
AddressLabelInfo
is a utility class for storing anAddress
and a corresponding label or alias together.
-
-
Constructor Summary
Constructors Constructor Description AddressLabelInfo(Address addr)
Constructs a new AddressLabelInfo object with only address informationAddressLabelInfo(Address addr, java.lang.String label, boolean isPrimary, Namespace scope, SourceType symbolSource, boolean isEntry)
AddressLabelInfo(Address addr, java.lang.String label, boolean isPrimary, Namespace scope, SourceType symbolSource, boolean isEntry, ProcessorSymbolType type)
AddressLabelInfo(Address addr, java.lang.String label, boolean isPrimary, SourceType symbolSource)
AddressLabelInfo(Symbol s)
Constructs a new AddressLabelInfo object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(AddressLabelInfo info)
Compares this object with the specified object for order.Address
getAddress()
Returns the object's address.java.lang.String
getLabel()
Returns the object's label or alias.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.Namespace
getScope()
Returns the scope for the symbol.SourceType
getSource()
boolean
isEntry()
boolean
isPrimary()
Returns whether the object is the primary label at the address.java.lang.String
toString()
-
-
-
Constructor Detail
-
AddressLabelInfo
public AddressLabelInfo(Symbol s)
Constructs a new AddressLabelInfo object- Parameters:
s
- symbol to initialize info from.
-
AddressLabelInfo
public AddressLabelInfo(Address addr, java.lang.String label, boolean isPrimary, Namespace scope, SourceType symbolSource, boolean isEntry)
-
AddressLabelInfo
public AddressLabelInfo(Address addr, java.lang.String label, boolean isPrimary, Namespace scope, SourceType symbolSource, boolean isEntry, ProcessorSymbolType type)
-
AddressLabelInfo
public AddressLabelInfo(Address addr, java.lang.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 Detail
-
getAddress
public final Address getAddress()
Returns the object's address.
-
getLabel
public final java.lang.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)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.- Specified by:
compareTo
in interfacejava.lang.Comparable<AddressLabelInfo>
- Parameters:
o
- the object to compare with this one
-
getSource
public SourceType getSource()
-
isEntry
public boolean isEntry()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-