Interface SettingsDefinition

All Known Subinterfaces:
BooleanSettingsDefinition, EnumSettingsDefinition, NumberSettingsDefinition, StringSettingsDefinition, TypeDefSettingsDefinition
All Known Implementing Classes:
AddressRangeEndpointSettingsDefinition, AddressSpaceSettingsDefinition, ByteCountSettingsDefinition, CharsetSettingsDefinition, CodeUnitCountSettingsDefinition, CodeUnitOffsetSettingsDefinition, ComponentOffsetSettingsDefinition, DataTypeMnemonicSettingsDefinition, EndianSettingsDefinition, FloatingPointPrecisionSettingsDefinition, FormatSettingsDefinition, FunctionInlineSettingsDefinition, FunctionNoReturnSettingsDefinition, FunctionThunkSettingsDefinition, IntegerSignednessFormattingModeSettingsDefinition, JavaEnumSettingsDefinition, MemoryOffsetSettingsDefinition, MutabilitySettingsDefinition, OffsetMaskSettingsDefinition, OffsetShiftSettingsDefinition, PaddingSettingsDefinition, PointerTypeSettingsDefinition, RenderUnicodeSettingsDefinition, TerminatedSettingsDefinition, TranslationSettingsDefinition

public interface SettingsDefinition
Generic interface for defining display options on data and dataTypes. Uses Settings objects to store values which are interpreted by SettingsDefinition objects.
  • Method Details

    • concat

      static SettingsDefinition[] concat(SettingsDefinition[] settings, SettingsDefinition... additional)
      Create a new list of SettingsDefinitions by concat'ing a base list with a var-arg'ish additional list of setting defs. Any additional duplicates are discarded.
      Parameters:
      settings - List of settings defs.
      additional - More settings defs to add
      Returns:
      new array with all the settings defs joined together.
    • filterSettingsDefinitions

      static SettingsDefinition[] filterSettingsDefinitions(SettingsDefinition[] definitions, Predicate<SettingsDefinition> filter)
      Get datatype settings definitions for the specified datatype exclusive of any default-use-only definitions.
      Parameters:
      definitions - settings definitions to be filtered
      filter - callback which determines if definition should be included in returned array
      Returns:
      filtered settings definitions
    • hasValue

      boolean hasValue(Settings setting)
      Determine if a setting value has been stored
      Parameters:
      setting - stored settings
      Returns:
      true if a value has been stored, else false
    • getValueString

      String getValueString(Settings settings)
      Get the setting value as a string which corresponds to this definition. A default value string will be returned if a setting has not been stored.
      Parameters:
      settings - settings
      Returns:
      value string or null if not set and default has not specified by this definition
    • getName

      String getName()
      Returns the display name of this SettingsDefinition
      Returns:
      display name for setting
    • getStorageKey

      String getStorageKey()
      Get the Settings key which is used when storing a key/value entry.
      Returns:
      settings storage key
    • getDescription

      String getDescription()
      Returns a description of this settings definition
      Returns:
      setting description
    • clear

      void clear(Settings settings)
      Removes any values in the given settings object assocated with this settings definition
      Parameters:
      settings - the settings object to be cleared.
    • copySetting

      void copySetting(Settings srcSettings, Settings destSettings)
      Copies any setting value associated with this settings definition from the srcSettings settings to the destSettings.
      Parameters:
      srcSettings - the settings to be copied
      destSettings - the settings to be updated.
    • hasSameValue

      boolean hasSameValue(Settings settings1, Settings settings2)
      Check two settings for equality which correspond to this settings definition.
      Parameters:
      settings1 - first settings
      settings2 - second settings
      Returns:
      true if the same else false