Package ghidra.formats.gfilesystem.fileinfo

# Class FileAttribute<T>

java.lang.Object
ghidra.formats.gfilesystem.fileinfo.FileAttribute<T>

Type Parameters:
  `T` - type of the value

public class FileAttribute<T> extends Object
A (type, type_display_string, value) tuple.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <T> FileAttribute<T>`
  `create(FileAttributeType attributeType, String attributeDisplayName, T attributeValue)`
  Creates a new `FileAttribute` instance with the specified type, display name and value.
  `static <T> FileAttribute<T>`
  `create(FileAttributeType attributeType, T attributeValue)`
  Creates a new `FileAttribute` instance with the specified type and value.
  `static <T> FileAttribute<T>`
  `create(String name, T attributeValue)`
  Creates a new `FileAttribute` instance with an `FileAttributeType.UNKNOWN_ATTRIBUTE` type and the specified display name.
  `boolean`
  `equals(Object obj)`
  `String`
  `getAttributeDisplayName()`
  Returns the display name of this instance.
  `FileAttributeType`
  `getAttributeType()`
  Returns the `FileAttributeType` of this instance.
  `T`
  `getAttributeValue()`
  Return the value.
  `int`
  `hashCode()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### create

    public static <T> FileAttribute<T> create(String name, T attributeValue)
    Creates a new `FileAttribute` instance with an `FileAttributeType.UNKNOWN_ATTRIBUTE` type and the specified display name.
    Type Parameters:
      `T` - type of the value
    Parameters:
      `name` - custom display name for the value
      `attributeValue` - value (should be .toString()'able)
    Returns:
      new FileAttribute instance

  - ### create

    public static <T> FileAttribute<T> create(FileAttributeType attributeType, T attributeValue)
    Creates a new `FileAttribute` instance with the specified type and value.
    Type Parameters:
      `T` - type of the value
    Parameters:
      `attributeType` - `FileAttributeType` type
      `attributeValue` - value (should match the type specified in `FileAttributeType.getValueType()`)
    Returns:
      new FileAttribute instance

  - ### create

    public static <T> FileAttribute<T> create(FileAttributeType attributeType, String attributeDisplayName, T attributeValue)
    Creates a new `FileAttribute` instance with the specified type, display name and value.
    Type Parameters:
      `T` - type of the value
    Parameters:
      `attributeType` - `FileAttributeType` type
      `attributeDisplayName` - display name of the type
      `attributeValue` - value (should match the type specified in `FileAttributeType.getValueType()`)
    Returns:
      new FileAttribute instance

  - ### getAttributeType

    public FileAttributeType getAttributeType()
    Returns the `FileAttributeType` of this instance.
    Returns:
      `FileAttributeType`

  - ### getAttributeDisplayName

    public String getAttributeDisplayName()
    Returns the display name of this instance. This is usually derived from the `FileAttributeType.getDisplayName()`.
    Returns:
      string display name

  - ### getAttributeValue

    public T getAttributeValue()
    Return the value.
    Returns:
      value

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`