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.ObjectA (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 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>create(java.lang.String name, T attributeValue)Creates a newFileAttributeinstance with anFileAttributeType.UNKNOWN_ATTRIBUTEtype and the specified display name.booleanequals(java.lang.Object obj)java.lang.StringgetAttributeDisplayName()Returns the display name of this instance.FileAttributeTypegetAttributeType()Returns theFileAttributeTypeof this instance.TgetAttributeValue()Return the value.inthashCode()
-
-
-
Method Detail
-
create
public static <T> FileAttribute<T> create(java.lang.String name, T attributeValue)
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
public static <T> FileAttribute<T> create(FileAttributeType attributeType, T attributeValue)
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, java.lang.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
public FileAttributeType getAttributeType()
Returns theFileAttributeTypeof 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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-