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 newFileAttributeinstance with the specified type, display name and value.static <T> FileAttribute<T> create(FileAttributeType attributeType, T attributeValue) Creates a newFileAttributeinstance with the specified type and value.static <T> FileAttribute<T> Creates a newFileAttributeinstance with anFileAttributeType.UNKNOWN_ATTRIBUTEtype and the specified display name.booleanReturns the display name of this instance.Returns theFileAttributeTypeof this instance.Return the value.inthashCode()
-
Method Details
-
create
Creates a newFileAttributeinstance with anFileAttributeType.UNKNOWN_ATTRIBUTEtype 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 newFileAttributeinstance with the specified type and value.- Type Parameters:
T- type of the value- Parameters:
attributeType-FileAttributeTypetypeattributeValue- 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 newFileAttributeinstance with the specified type, display name and value.- Type Parameters:
T- type of the value- Parameters:
attributeType-FileAttributeTypetypeattributeDisplayName- display name of the typeattributeValue- value (should match the type specified inFileAttributeType.getValueType())- Returns:
- new FileAttribute instance
-
getAttributeType
Returns theFileAttributeTypeof 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
-