Package ghidra.program.model.symbol
Enum Class SourceType
- All Implemented Interfaces:
Serializable,Comparable<SourceType>,Constable
SourceType provides a prioritized indication as to the general source of a specific
markup made to a Program. The priority of each defined source type may be used to
restrict the impact or protect the related markup.
The following ordered list indicates the relative priority of the defined source types, where the highest-priority is listed first and the lowest-priority is listed last. The ANALYSIS and AI source types have equal priority.
- USER_DEFINED
- IMPORTED
- ANALYSIS / AI
- DEFAULT
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAI: (same level as ANALYSIS) reflects content produced through AI assistance.ANALYSIS: (same level as AI) reflects content produced by an analyzer.DEFAULT: (lowest priority) generally reflects dynamicaly produced content.IMPORTED: reflects content produced during import of reliable data.USER_DEFINED: (highest priority) reflects content produced by the user or in response to a user action. -
Method Summary
Modifier and TypeMethodDescriptionReturns a user-friendly string.intReturns numeric priority relative to other SourceType. Higher numbers are higher priority..static SourceTypegetSourceType(int storageId) Get the SourceType which corresponds to the specified storage ID.intReturns the storage ID which should be used for persistent serialization.booleanDetermine if this source type has the same or higher priority than the one being passed to this method as a parameter.booleanisHigherPriorityThan(SourceType source) Determine if this source type has a higher priority than the one being passed to this method as a parameter.booleanisLowerOrEqualPriorityThan(SourceType source) Determine if this source type has the same or lower priority than the one being passed to this method as a parameter.booleanisLowerPriorityThan(SourceType source) Determine if this source type has a lower priority than the one being passed to this method as a parameter.static SourceTypeReturns the enum constant of this class with the specified name.static SourceType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
DEFAULT: (lowest priority) generally reflects dynamicaly produced content. -
ANALYSIS
ANALYSIS: (same level as AI) reflects content produced by an analyzer. -
AI
AI: (same level as ANALYSIS) reflects content produced through AI assistance. -
IMPORTED
IMPORTED: reflects content produced during import of reliable data. -
USER_DEFINED
USER_DEFINED: (highest priority) reflects content produced by the user or in response to a user action.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getSourceType
Get the SourceType which corresponds to the specified storage ID.- Parameters:
storageId- storage ID- Returns:
- SourceType
- Throws:
NoSuchElementException- if specified storage ID is not defined.
-
getPriority
public int getPriority()Returns numeric priority relative to other SourceType. Higher numbers are higher priority..- Returns:
- numeric priority relative to other SourceType. Higher numbers are higher priority.
-
getStorageId
public int getStorageId()Returns the storage ID which should be used for persistent serialization.- Returns:
- the storage ID which should be used for persistent serialization
-
getDisplayString
Returns a user-friendly string.- Returns:
- a user-friendly string
-
isHigherPriorityThan
Determine if this source type has a higher priority than the one being passed to this method as a parameter.- Parameters:
source- the source type whose priority is to be compared with this one's.- Returns:
- true if this source type is a higher priority. false if this source type is the same priority or lower priority.
-
isHigherOrEqualPriorityThan
Determine if this source type has the same or higher priority than the one being passed to this method as a parameter.- Parameters:
source- the source type whose priority is to be compared with this one's.- Returns:
- true if this source type is a higher priority. false if this source type is the same priority or lower priority.
-
isLowerPriorityThan
Determine if this source type has a lower priority than the one being passed to this method as a parameter.- Parameters:
source- the source type whose priority is to be compared with this one's.- Returns:
- true if this source type is a lower priority. false if this source type is the same priority or higher priority.
-
isLowerOrEqualPriorityThan
Determine if this source type has the same or lower priority than the one being passed to this method as a parameter.- Parameters:
source- the source type whose priority is to be compared with this one's.- Returns:
- true if this source type is a lower priority. false if this source type is the same priority or higher priority.
-