Package ghidra.program.model.data
Interface Array
- 
- All Superinterfaces:
- DataType
 - All Known Implementing Classes:
- ArrayDataType
 
 public interface Array extends DataType Array interface
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringARRAY_LABEL_PREFIX- 
Fields inherited from interface ghidra.program.model.data.DataTypeCONFLICT_SUFFIX, DEFAULT, NO_LAST_CHANGE_TIME, NO_SOURCE_SYNC_TIME, VOID
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.StringgetArrayDefaultLabelPrefix(MemBuffer buf, Settings settings, int len, DataTypeDisplayOptions options)Get the appropriate string to use as the label prefix for an array, taking into account the actual data at the memory location.default java.lang.StringgetArrayDefaultOffcutLabelPrefix(MemBuffer buf, Settings settings, int len, DataTypeDisplayOptions options, int offcutLength)Get the appropriate string to use as the offcut label prefix for an array, taking into account the actual data at the memory location.default java.lang.StringgetArrayRepresentation(MemBuffer buf, Settings settings, int length)Get the representation which corresponds to an array in memory.default java.lang.ObjectgetArrayValue(MemBuffer buf, Settings settings, int length)Get the value object which corresponds to an array in memory.default java.lang.Class<?>getArrayValueClass(Settings settings)Get the value Class of a specific arrayDt with settings ( seegetArrayValueClass(Settings)).DataTypegetDataType()Returns the dataType of the elements in the array.intgetElementLength()Returns the length of an element in the array.intgetNumElements()Returns the number of elements in the array- 
Methods inherited from interface ghidra.program.model.data.DataTypeaddParent, clone, copy, dataTypeAlignmentChanged, dataTypeDeleted, dataTypeNameChanged, dataTypeReplaced, dataTypeSizeChanged, dependsOn, encodeRepresentation, encodeValue, getAlignment, getCategoryPath, getDataOrganization, getDataTypeManager, getDataTypePath, getDefaultAbbreviatedLabelPrefix, getDefaultLabelPrefix, getDefaultLabelPrefix, getDefaultOffcutLabelPrefix, getDefaultSettings, getDescription, getDisplayName, getDocs, getLastChangeTime, getLastChangeTimeInSourceArchive, getLength, getMnemonic, getName, getParents, getPathName, getRepresentation, getSettingsDefinitions, getSourceArchive, getUniversalID, getValue, getValueClass, hasLanguageDependantLength, isDeleted, isEncodable, isEquivalent, isNotYetDefined, isZeroLength, removeParent, replaceWith, setCategoryPath, setDefaultSettings, setDescription, setLastChangeTime, setLastChangeTimeInSourceArchive, setName, setNameAndCategory, setSourceArchive
 
- 
 
- 
- 
- 
Field Detail- 
ARRAY_LABEL_PREFIXstatic final java.lang.String ARRAY_LABEL_PREFIX - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getNumElementsint getNumElements() Returns the number of elements in the array- Returns:
- the number of elements in the array
 
 - 
getElementLengthint getElementLength() Returns the length of an element in the array. In the case of a Dynamic base datatype, this element length will have been explicitly specified at the time of construction. For a zero-length base type an element length of 1 will be reported withDataType.getLength()returning the number of elements.- Returns:
- the length of one element in the array.
 
 - 
getDataTypeDataType getDataType() Returns the dataType of the elements in the array.- Returns:
- the dataType of the elements in the array
 
 - 
getArrayDefaultLabelPrefixdefault java.lang.String getArrayDefaultLabelPrefix(MemBuffer buf, Settings settings, int len, DataTypeDisplayOptions options) Get the appropriate string to use as the label prefix for an array, taking into account the actual data at the memory location.See also DataType.getDefaultLabelPrefix()- Parameters:
- buf- memory buffer containing the bytes.
- settings- the Settings object
- len- the length of the data.
- options- options for how to format the default label prefix.
- Returns:
- the label prefix or null if not applicable
 
 - 
getArrayDefaultOffcutLabelPrefixdefault java.lang.String getArrayDefaultOffcutLabelPrefix(MemBuffer buf, Settings settings, int len, DataTypeDisplayOptions options, int offcutLength) Get the appropriate string to use as the offcut label prefix for an array, taking into account the actual data at the memory location.See also DataType.getDefaultLabelPrefix()- Parameters:
- buf- memory buffer containing the bytes.
- settings- the Settings object
- len- the length of the data.
- options- options for how to format the default label prefix.
- offcutLength- offcut offset from start of buf
- Returns:
- the offcut label prefix or null if not applicable
 
 - 
getArrayRepresentationdefault java.lang.String getArrayRepresentation(MemBuffer buf, Settings settings, int length) Get the representation which corresponds to an array in memory. This will either be a String for the ArrayStringable case, "??" for uninitialized data, or the empty string if it is not.- Parameters:
- buf- data buffer
- settings- data settings
- length- length of array
- Returns:
- a String if it is an array of chars; otherwise empty string, never null.
 
 - 
getArrayValuedefault java.lang.Object getArrayValue(MemBuffer buf, Settings settings, int length) Get the value object which corresponds to an array in memory. This will either be a String for the ArrayStringable case or null.- Parameters:
- buf- data buffer
- settings- data settings
- length- length of array
- Returns:
- a String if it is an array of chars; otherwise null.
 
 - 
getArrayValueClassdefault java.lang.Class<?> getArrayValueClass(Settings settings) Get the value Class of a specific arrayDt with settings ( seegetArrayValueClass(Settings)).- Parameters:
- settings- the relevant settings to use or null for default.
- Returns:
- Class of the value to be returned by the array or null if it can vary or is unspecified (String or Array class will be returned).
 
 
- 
 
-