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>
AddressLabelInfois a utility class for storing anAddressand 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 intcompareTo(AddressLabelInfo info)AddressgetAddress()Returns the object's address.java.lang.StringgetLabel()Returns the object's label or alias.ProcessorSymbolTypegetProcessorSymbolType()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.NamespacegetScope()Returns the scope for the symbol.SourceTypegetSource()booleanisEntry()booleanisPrimary()Returns whether the object is the primary label at the address.java.lang.StringtoString()
-
-
-
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)
- Specified by:
compareToin interfacejava.lang.Comparable<AddressLabelInfo>
-
getSource
public SourceType getSource()
-
isEntry
public boolean isEntry()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-