Package ghidra.program.model.data

# Interface FactoryDataType

All Superinterfaces:
  `BuiltInDataType`, `DataType`, `ExtensionPoint`

All Known Implementing Classes:
  `ElfDataType`, `FactoryStructureDataType`, `PeDataType`

public interface FactoryDataType extends BuiltInDataType
A DataType class that creates data types dynamically should implement this interface. This prevents them being directly referred to by a data instance within the listing or within a composite (e.g., added to a composite using the structure editor). FactoryDataType's should never be parented (e.g., Pointer, Structure component, Typedef, etc.).

- ## Field Summary

  ### Fields inherited from interface ghidra.program.model.data.DataType

  `CONFLICT_SUFFIX, DEFAULT, NO_LAST_CHANGE_TIME, NO_SOURCE_SYNC_TIME, TYPEDEF_ATTRIBUTE_PREFIX, TYPEDEF_ATTRIBUTE_SUFFIX, VOID`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DataType`
  `getDataType(MemBuffer buf)`
  Returns the appropriate DataType which corresponds to the specified memory location.
  `default int`
  `getLength()`
  All implementations must return a length of -1.

  ### Methods inherited from interface ghidra.program.model.data.BuiltInDataType

  `getCTypeDeclaration, setDefaultSettings`

  ### Methods inherited from interface ghidra.program.model.data.DataType

  `addParent, clone, copy, dataTypeAlignmentChanged, dataTypeDeleted, dataTypeNameChanged, dataTypeReplaced, dataTypeSizeChanged, dependsOn, encodeRepresentation, encodeValue, getAlignedLength, getAlignment, getCategoryPath, getDataOrganization, getDataTypeManager, getDataTypePath, getDefaultAbbreviatedLabelPrefix, getDefaultLabelPrefix, getDefaultLabelPrefix, getDefaultOffcutLabelPrefix, getDefaultSettings, getDescription, getDisplayName, getDocs, getLastChangeTime, getLastChangeTimeInSourceArchive, getMnemonic, getName, getParents, getPathName, getRepresentation, getSettingsDefinitions, getSourceArchive, getTypeDefSettingsDefinitions, getUniversalID, getValue, getValueClass, hasLanguageDependantLength, isDeleted, isEncodable, isEquivalent, isNotYetDefined, isZeroLength, removeParent, replaceWith, setCategoryPath, setDescription, setLastChangeTime, setLastChangeTimeInSourceArchive, setName, setNameAndCategory, setSourceArchive`

- ## Method Details

  - ### getDataType

    DataType getDataType(MemBuffer buf)
    Returns the appropriate DataType which corresponds to the specified memory location.
    Parameters:
      `buf` - memory location
    Returns:
      fabricated datatype based upon memory data

  - ### getLength

    default int getLength()
    All implementations must return a length of -1.
    Specified by:
      `getLength` in interface `DataType`
    Returns:
      length of -1