Package ghidra.program.model.data
Class OffsetMaskSettingsDefinition
java.lang.Object
ghidra.program.model.data.OffsetMaskSettingsDefinition
- All Implemented Interfaces:
NumberSettingsDefinition
,SettingsDefinition
,TypeDefSettingsDefinition
public class OffsetMaskSettingsDefinition
extends Object
implements NumberSettingsDefinition, TypeDefSettingsDefinition
Setting definition for a pointer offset bit-mask to be applied prior to any
bit-shift (if specified) during the computation of an actual address offset.
Mask is defined as an unsigned long value where
a value of zero (0) is ignored and has no affect on pointer computation.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Determine if negative values are permitted.void
Removes any values in the given settings object assocated with this settings definitionvoid
copySetting
(Settings srcSettings, Settings destSettings) Copies any setting value associated with this settings definition from the srcSettings settings to the destSettings.getAttributeSpecification
(Settings settings) Get theTypeDef
attribute specification for this setting and its current value.Returns a description of this settings definitionGet the maximum value permitted.getName()
Returns the display name of this SettingsDefinitionGet theSettings
key which is used when storing a key/value entry.long
Gets the value for this SettingsDefinition given a Settings object.boolean
Determine if a setting value has been storedboolean
Determine if hexidecimal entry/display is preferred due to the nature of the setting (e.g., mask)void
Sets the given value into the given settings object using this settingsDefinition as the key.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ghidra.docking.settings.NumberSettingsDefinition
getValueString, hasSameValue
-
Field Details
-
DEFAULT
public static final long DEFAULT- See Also:
-
DEF
-
-
Method Details
-
getMaxValue
Description copied from interface:NumberSettingsDefinition
Get the maximum value permitted. The absolute value of the setting may not exceed this value.- Specified by:
getMaxValue
in interfaceNumberSettingsDefinition
- Returns:
- maximum value permitted
-
allowNegativeValue
public boolean allowNegativeValue()Description copied from interface:NumberSettingsDefinition
Determine if negative values are permitted.- Specified by:
allowNegativeValue
in interfaceNumberSettingsDefinition
- Returns:
- true if negative values are permitted, else false.
-
isHexModePreferred
public boolean isHexModePreferred()Description copied from interface:NumberSettingsDefinition
Determine if hexidecimal entry/display is preferred due to the nature of the setting (e.g., mask)- Specified by:
isHexModePreferred
in interfaceNumberSettingsDefinition
- Returns:
- true if hex preferred over decimal, else false
-
getValue
Description copied from interface:NumberSettingsDefinition
Gets the value for this SettingsDefinition given a Settings object.- Specified by:
getValue
in interfaceNumberSettingsDefinition
- Parameters:
settings
- the set of Settings values for a particular location or null for default value.- Returns:
- the value for this settings object given the context.
-
setValue
Description copied from interface:NumberSettingsDefinition
Sets the given value into the given settings object using this settingsDefinition as the key.- Specified by:
setValue
in interfaceNumberSettingsDefinition
- Parameters:
settings
- the settings object to store the value in.value
- the value to store in the settings object using this settingsDefinition as the key.
-
hasValue
Description copied from interface:SettingsDefinition
Determine if a setting value has been stored- Specified by:
hasValue
in interfaceSettingsDefinition
- Parameters:
settings
- stored settings- Returns:
- true if a value has been stored, else false
-
getName
Description copied from interface:SettingsDefinition
Returns the display name of this SettingsDefinition- Specified by:
getName
in interfaceSettingsDefinition
- Returns:
- display name for setting
-
getStorageKey
Description copied from interface:SettingsDefinition
Get theSettings
key which is used when storing a key/value entry.- Specified by:
getStorageKey
in interfaceSettingsDefinition
- Returns:
- settings storage key
-
getDescription
Description copied from interface:SettingsDefinition
Returns a description of this settings definition- Specified by:
getDescription
in interfaceSettingsDefinition
- Returns:
- setting description
-
clear
Description copied from interface:SettingsDefinition
Removes any values in the given settings object assocated with this settings definition- Specified by:
clear
in interfaceSettingsDefinition
- Parameters:
settings
- the settings object to be cleared.
-
copySetting
Description copied from interface:SettingsDefinition
Copies any setting value associated with this settings definition from the srcSettings settings to the destSettings.- Specified by:
copySetting
in interfaceSettingsDefinition
- Parameters:
srcSettings
- the settings to be copieddestSettings
- the settings to be updated.
-
getAttributeSpecification
Description copied from interface:TypeDefSettingsDefinition
Get theTypeDef
attribute specification for this setting and its current value.- Specified by:
getAttributeSpecification
in interfaceTypeDefSettingsDefinition
- Parameters:
settings
- typedef settings- Returns:
- attribute specification or null if not currently set.
-