Class FileAttribute<T>
- java.lang.Object
-
- ghidra.formats.gfilesystem.fileinfo.FileAttribute<T>
-
- Type Parameters:
T
- type of the value
public class FileAttribute<T> extends java.lang.Object
A (type, type_display_string, value) tuple.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> FileAttribute<T>
create(FileAttributeType attributeType, java.lang.String attributeDisplayName, T attributeValue)
Creates a newFileAttribute
instance with the specified type, display name and value.static <T> FileAttribute<T>
create(FileAttributeType attributeType, T attributeValue)
Creates a newFileAttribute
instance with the specified type and value.static <T> FileAttribute<T>
create(java.lang.String name, T attributeValue)
Creates a newFileAttribute
instance with anFileAttributeType.UNKNOWN_ATTRIBUTE
type and the specified display name.boolean
equals(java.lang.Object obj)
java.lang.String
getAttributeDisplayName()
Returns the display name of this instance.FileAttributeType
getAttributeType()
Returns theFileAttributeType
of this instance.T
getAttributeValue()
Return the value.int
hashCode()
-
-
-
Method Detail
-
create
public static <T> FileAttribute<T> create(java.lang.String name, T attributeValue)
Creates a newFileAttribute
instance with anFileAttributeType.UNKNOWN_ATTRIBUTE
type and the specified display name.- Type Parameters:
T
- type of the value- Parameters:
name
- custom display name for the valueattributeValue
- value (should be .toString()'able)- Returns:
- new FileAttribute instance
-
create
public static <T> FileAttribute<T> create(FileAttributeType attributeType, T attributeValue)
Creates a newFileAttribute
instance with the specified type and value.- Type Parameters:
T
- type of the value- Parameters:
attributeType
-FileAttributeType
typeattributeValue
- value (should match the type specified inFileAttributeType.getValueType()
)- Returns:
- new FileAttribute instance
-
create
public static <T> FileAttribute<T> create(FileAttributeType attributeType, java.lang.String attributeDisplayName, T attributeValue)
Creates a newFileAttribute
instance with the specified type, display name and value.- Type Parameters:
T
- type of the value- Parameters:
attributeType
-FileAttributeType
typeattributeDisplayName
- display name of the typeattributeValue
- value (should match the type specified inFileAttributeType.getValueType()
)- Returns:
- new FileAttribute instance
-
getAttributeType
public FileAttributeType getAttributeType()
Returns theFileAttributeType
of this instance.- Returns:
FileAttributeType
-
getAttributeDisplayName
public java.lang.String getAttributeDisplayName()
Returns the display name of this instance. This is usually derived from theFileAttributeType.getDisplayName()
.- Returns:
- string display name
-
getAttributeValue
public T getAttributeValue()
Return the value.- Returns:
- value
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-