Class OffsetShiftSettingsDefinition

java.lang.Object
ghidra.program.model.data.OffsetShiftSettingsDefinition
All Implemented Interfaces:
NumberSettingsDefinition, SettingsDefinition, TypeDefSettingsDefinition

public class OffsetShiftSettingsDefinition extends Object implements NumberSettingsDefinition, TypeDefSettingsDefinition
  • Field Details

  • Method Details

    • getMaxValue

      public BigInteger 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 interface NumberSettingsDefinition
      Returns:
      maximum value permitted
    • allowNegativeValue

      public boolean allowNegativeValue()
      Description copied from interface: NumberSettingsDefinition
      Determine if negative values are permitted.
      Specified by:
      allowNegativeValue in interface NumberSettingsDefinition
      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 interface NumberSettingsDefinition
      Returns:
      true if hex preferred over decimal, else false
    • getValue

      public long getValue(Settings settings)
      Description copied from interface: NumberSettingsDefinition
      Gets the value for this SettingsDefinition given a Settings object.
      Specified by:
      getValue in interface NumberSettingsDefinition
      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

      public void setValue(Settings settings, long value)
      Description copied from interface: NumberSettingsDefinition
      Sets the given value into the given settings object using this settingsDefinition as the key.
      Specified by:
      setValue in interface NumberSettingsDefinition
      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

      public boolean hasValue(Settings settings)
      Description copied from interface: SettingsDefinition
      Determine if a setting value has been stored
      Specified by:
      hasValue in interface SettingsDefinition
      Parameters:
      settings - stored settings
      Returns:
      true if a value has been stored, else false
    • getName

      public String getName()
      Description copied from interface: SettingsDefinition
      Returns the display name of this SettingsDefinition
      Specified by:
      getName in interface SettingsDefinition
      Returns:
      display name for setting
    • getStorageKey

      public String getStorageKey()
      Description copied from interface: SettingsDefinition
      Get the Settings key which is used when storing a key/value entry.
      Specified by:
      getStorageKey in interface SettingsDefinition
      Returns:
      settings storage key
    • getDescription

      public String getDescription()
      Description copied from interface: SettingsDefinition
      Returns a description of this settings definition
      Specified by:
      getDescription in interface SettingsDefinition
      Returns:
      setting description
    • clear

      public void clear(Settings settings)
      Description copied from interface: SettingsDefinition
      Removes any values in the given settings object assocated with this settings definition
      Specified by:
      clear in interface SettingsDefinition
      Parameters:
      settings - the settings object to be cleared.
    • copySetting

      public void copySetting(Settings srcSettings, Settings destSettings)
      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 interface SettingsDefinition
      Parameters:
      srcSettings - the settings to be copied
      destSettings - the settings to be updated.
    • getAttributeSpecification

      public String getAttributeSpecification(Settings settings)
      Description copied from interface: TypeDefSettingsDefinition
      Get the TypeDef attribute specification for this setting and its current value.
      Specified by:
      getAttributeSpecification in interface TypeDefSettingsDefinition
      Parameters:
      settings - typedef settings
      Returns:
      attribute specification or null if not currently set.