Class FileAttribute<T>
java.lang.Object
ghidra.formats.gfilesystem.fileinfo.FileAttribute<T>
- Type Parameters:
T
- type of the value
A (type, type_display_string, value) tuple.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> FileAttribute
<T> create
(FileAttributeType attributeType, 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> Creates a newFileAttribute
instance with anFileAttributeType.UNKNOWN_ATTRIBUTE
type and the specified display name.boolean
Returns the display name of this instance.Returns theFileAttributeType
of this instance.Return the value.int
hashCode()
-
Method Details
-
create
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
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, 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
Returns theFileAttributeType
of this instance.- Returns:
FileAttributeType
-
getAttributeDisplayName
Returns the display name of this instance. This is usually derived from theFileAttributeType.getDisplayName()
.- Returns:
- string display name
-
getAttributeValue
Return the value.- Returns:
- value
-
hashCode
public int hashCode() -
equals
-