Package ghidra.program.model.data
Interface CompositeInternal
-
- All Known Subinterfaces:
StructureInternal
,UnionInternal
- All Known Implementing Classes:
CompositeDataTypeImpl
,StructureDataType
,UnionDataType
public interface CompositeInternal extends Composite
Interface for common methods in Structure and Union
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
CompositeInternal.ComponentComparator
ComponentComparator
provides ability to compare two DataTypeComponent objects based upon their ordinal.static class
CompositeInternal.OffsetComparator
OffsetComparator
provides ability to compare an Integer offset with a DataTypeComponent object.static class
CompositeInternal.OrdinalComparator
OrdinalComparator
provides ability to compare an Integer ordinal with a DataTypeComponent object.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ALIGN_NAME
static int
DEFAULT_ALIGNMENT
The stored minimum alignment value which indicates the default alignment should be used based upon the packing and component alignment requirements.static int
DEFAULT_PACKING
The stored packing value which corresponds to a composite that will automatically pack based upon the alignment requirements of its components.static java.lang.String
DEFAULT_PACKING_NAME
static java.lang.String
DISABLED_PACKING_NAME
static int
MACHINE_ALIGNMENT
The stored minimum alignment value which indicates the machine alignment should be used as the minimum alignment (as defined by the currentDataOrganization.getMachineAlignment()
).static int
NO_PACKING
The stored packing value which corresponds to a composite whose packing has been disabled.static java.lang.String
PACKING_NAME
-
Fields inherited from interface ghidra.program.model.data.DataType
CONFLICT_SUFFIX, DEFAULT, NO_LAST_CHANGE_TIME, NO_SOURCE_SYNC_TIME, VOID
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static java.lang.String
getAlignmentAndPackingString(Composite composite)
static java.lang.String
getMinAlignmentString(Composite composite)
static java.lang.String
getPackingString(Composite composite)
int
getStoredMinimumAlignment()
Get the minimum alignment setting for this Composite which contributes to the actual computed alignment value (seeComposite.getAlignment()
.int
getStoredPackingValue()
Gets the current packing value (typically a power of 2).static java.lang.String
toString(Composite composite)
Dump composite and its components for use in#toString()
representation.-
Methods inherited from interface ghidra.program.model.data.Composite
add, add, add, add, addBitField, align, dataTypeAlignmentChanged, delete, delete, getAlignment, getAlignmentType, getComponent, getComponents, getDefinedComponents, getExplicitMinimumAlignment, getExplicitPackingValue, getNumComponents, getNumDefinedComponents, getPackingType, hasDefaultPacking, hasExplicitMinimumAlignment, hasExplicitPackingValue, insert, insert, insert, isDefaultAligned, isMachineAligned, isPackingEnabled, isPartOf, pack, repack, setDescription, setExplicitMinimumAlignment, setExplicitPackingValue, setPackingEnabled, setToDefaultAligned, setToDefaultPacking, setToMachineAligned
-
Methods inherited from interface ghidra.program.model.data.DataType
addParent, clone, copy, dataTypeDeleted, dataTypeNameChanged, dataTypeReplaced, dataTypeSizeChanged, dependsOn, encodeRepresentation, encodeValue, 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, setLastChangeTime, setLastChangeTimeInSourceArchive, setName, setNameAndCategory, setSourceArchive
-
-
-
-
Field Detail
-
ALIGN_NAME
static final java.lang.String ALIGN_NAME
- See Also:
- Constant Field Values
-
PACKING_NAME
static final java.lang.String PACKING_NAME
- See Also:
- Constant Field Values
-
DISABLED_PACKING_NAME
static final java.lang.String DISABLED_PACKING_NAME
- See Also:
- Constant Field Values
-
DEFAULT_PACKING_NAME
static final java.lang.String DEFAULT_PACKING_NAME
- See Also:
- Constant Field Values
-
DEFAULT_PACKING
static final int DEFAULT_PACKING
The stored packing value which corresponds to a composite that will automatically pack based upon the alignment requirements of its components. A positive pack value will also pack in a similar fashion but will use the pack value as a maximum alignment for each component. SeegetStoredPackingValue()
.- See Also:
- Constant Field Values
-
NO_PACKING
static final int NO_PACKING
The stored packing value which corresponds to a composite whose packing has been disabled. In the case of structures this will permit explicit component placement by offset within the structure and undefined filler components will be used. This is the initial state of all newly instantiated structures. SeegetStoredPackingValue()
.- See Also:
- Constant Field Values
-
DEFAULT_ALIGNMENT
static final int DEFAULT_ALIGNMENT
The stored minimum alignment value which indicates the default alignment should be used based upon the packing and component alignment requirements. SeegetStoredMinimumAlignment()
.- See Also:
- Constant Field Values
-
MACHINE_ALIGNMENT
static final int MACHINE_ALIGNMENT
The stored minimum alignment value which indicates the machine alignment should be used as the minimum alignment (as defined by the currentDataOrganization.getMachineAlignment()
). SeegetStoredMinimumAlignment()
.- See Also:
- Constant Field Values
-
-
Method Detail
-
getStoredPackingValue
int getStoredPackingValue()
-
getStoredMinimumAlignment
int getStoredMinimumAlignment()
Get the minimum alignment setting for this Composite which contributes to the actual computed alignment value (seeComposite.getAlignment()
.- Returns:
- the minimum alignment setting for this Composite or a reserved value to indicate
either
DEFAULT_ALIGNMENT
orMACHINE_ALIGNMENT
.
-
toString
static java.lang.String toString(Composite composite)
Dump composite and its components for use in#toString()
representation.- Parameters:
composite
- composite instance to be dumped- Returns:
- formatted dump as string
-
getAlignmentAndPackingString
static java.lang.String getAlignmentAndPackingString(Composite composite)
-
getMinAlignmentString
static java.lang.String getMinAlignmentString(Composite composite)
-
getPackingString
static java.lang.String getPackingString(Composite composite)
-
-