Package ghidra.program.model.data
Class GenericDataType
- java.lang.Object
-
- ghidra.program.model.data.AbstractDataType
-
- ghidra.program.model.data.DataTypeImpl
-
- ghidra.program.model.data.GenericDataType
-
- All Implemented Interfaces:
DataType
- Direct Known Subclasses:
CompositeDataTypeImpl
,EnumDataType
,FunctionDefinitionDataType
,TypedefDataType
public abstract class GenericDataType extends DataTypeImpl
Base implementation for a generic data type.
-
-
Field Summary
-
Fields inherited from class ghidra.program.model.data.DataTypeImpl
defaultSettings
-
Fields inherited from class ghidra.program.model.data.AbstractDataType
categoryPath, dataMgr, name
-
Fields inherited from interface ghidra.program.model.data.DataType
CONFLICT_SUFFIX, DEFAULT, NO_LAST_CHANGE_TIME, NO_SOURCE_SYNC_TIME, VOID
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GenericDataType(CategoryPath path, java.lang.String name, DataTypeManager dataMgr)
protected
GenericDataType(CategoryPath path, java.lang.String name, UniversalID universalID, SourceArchive sourceArchive, long lastChangeTime, long lastChangeTimeInSourceArchive, DataTypeManager dataMgr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setCategoryPath(CategoryPath path)
Set the categoryPath associated with this datatypevoid
setName(java.lang.String name)
Sets the name of the datatypevoid
setNameAndCategory(CategoryPath path, java.lang.String name)
Sets the name and category of a datatype at the same time.-
Methods inherited from class ghidra.program.model.data.DataTypeImpl
addParent, equals, getAlignment, getDefaultSettings, getLastChangeTime, getLastChangeTimeInSourceArchive, getParents, getPathName, getSettingsDefinitions, getSourceArchive, getUniversalID, getValueClass, hashCode, notifyAlignmentChanged, notifyDeleted, notifyNameChanged, notifyParents, notifyReplaced, notifySizeChanged, removeParent, replaceWith, setDefaultSettings, setDescription, setLastChangeTime, setLastChangeTimeInSourceArchive, setSourceArchive
-
Methods inherited from class ghidra.program.model.data.AbstractDataType
dataTypeAlignmentChanged, dataTypeDeleted, dataTypeNameChanged, dataTypeReplaced, dataTypeSizeChanged, dependsOn, encodeRepresentation, encodeValue, getCategoryPath, getDataOrganization, getDataTypeManager, getDataTypePath, getDefaultAbbreviatedLabelPrefix, getDefaultLabelPrefix, getDefaultLabelPrefix, getDefaultOffcutLabelPrefix, getDisplayName, getDocs, getMnemonic, getName, hasLanguageDependantLength, isDeleted, isEncodable, isNotYetDefined, isZeroLength, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ghidra.program.model.data.DataType
clone, copy, getDescription, getLength, getRepresentation, getValue, isEquivalent
-
-
-
-
Constructor Detail
-
GenericDataType
protected GenericDataType(CategoryPath path, java.lang.String name, DataTypeManager dataMgr)
-
GenericDataType
protected GenericDataType(CategoryPath path, java.lang.String name, UniversalID universalID, SourceArchive sourceArchive, long lastChangeTime, long lastChangeTimeInSourceArchive, DataTypeManager dataMgr)
-
-
Method Detail
-
setNameAndCategory
public void setNameAndCategory(CategoryPath path, java.lang.String name) throws InvalidNameException, DuplicateNameException
Description copied from interface:DataType
Sets the name and category of a datatype at the same time.- Specified by:
setNameAndCategory
in interfaceDataType
- Overrides:
setNameAndCategory
in classAbstractDataType
- Parameters:
path
- the new category path.name
- the new name- Throws:
InvalidNameException
- if the name is invalidDuplicateNameException
- if name change on storedDataType
is a duplicate of another datatype within the same category (only applies to DB storedDataType
).
-
setName
public void setName(java.lang.String name) throws InvalidNameException
Description copied from interface:DataType
Sets the name of the datatype- Specified by:
setName
in interfaceDataType
- Overrides:
setName
in classAbstractDataType
- Parameters:
name
- the new name for this datatype.- Throws:
InvalidNameException
- if the given name does not form a valid name.
-
setCategoryPath
public void setCategoryPath(CategoryPath path)
Description copied from interface:DataType
Set the categoryPath associated with this datatype- Specified by:
setCategoryPath
in interfaceDataType
- Overrides:
setCategoryPath
in classAbstractDataType
- Parameters:
path
- the new path
-
-