Interface IStructureType
- All Superinterfaces:
ICodeItem
,ICodeType
,INativeItem
,INativeItemListenable
,INativeType
- All Known Subinterfaces:
IClassType
Type item representing a structure or union (structure wit overlapping fields).
Fields manipulation (addition, removal, etc.) can be done via the structure's controlling
type manager
.
-
Field Summary
Fields inherited from interface com.pnfsoftware.jeb.core.units.code.ICodeItem
FLAG_ABSTRACT, FLAG_ANNOTATION, FLAG_ANONYMOUS, FLAG_ARTIFICIAL, FLAG_BRIDGE, FLAG_CONSTRUCTOR, FLAG_DECLARED_SYNCHRONIZED, FLAG_DESTRUCTOR, FLAG_ENUM, FLAG_FINAL, FLAG_INNER, FLAG_INTERFACE, FLAG_INTERNAL, FLAG_NATIVE, FLAG_PRIVATE, FLAG_PROTECTED, FLAG_PUBLIC, FLAG_STATIC, FLAG_STRICT, FLAG_SYNCHRONIZED, FLAG_SYNTHETIC, FLAG_TRANSIENT, FLAG_VARARGS, FLAG_VIRTUAL, FLAG_VOLATILE
-
Method Summary
Modifier and TypeMethodDescriptionint
Retrieve the structure's actual global alignment.getField
(int index) getFieldAfter
(int offset) getFieldAt
(int offset) getFieldAt
(int offset, int bitstart) getFieldByName
(String name) getFieldOver
(int offset) List<? extends IStructureTypeField>
Get the list of true (non-synthetic) fields.int
Get the number of fields.List<? extends IStructureTypeField>
Get a complete list of fields as well as gaps in-between fields (synthetic fields).int
Get the index of the provided field.int
Retrieve the structure's fields alignment, aka fields padding/packing.boolean
isCircular
(INativeType type) boolean
Determine whether this type is a structure (not a union).boolean
isUnion()
Determine whether this type is a union (not a structure).Methods inherited from interface com.pnfsoftware.jeb.core.units.code.ICodeItem
getAddress, getAddress, getGenericFlags, getIndex, getItemId, getName, getName, getSignature, getSignature, getSignature, isArtificial, isInternal
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.ICodeType
getImplementingClass
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.items.INativeItem
addFlags, dispose, getAttribute, getAttributes, hasAttribute, hasFlag, hasTrueAttribute, isAutoGenerated, isDisposed, isRenamed, removeAttribute, removeFlags, setAttribute, setAutoGenerated, setFlags, setName
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.items.INativeItemListenable
addListener, removeListener
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.type.INativeType
getBitsize, getReference, getSize, getTypeManager
-
Method Details
-
isStructure
boolean isStructure()Determine whether this type is a structure (not a union).- Returns:
-
isUnion
boolean isUnion()Determine whether this type is a union (not a structure).- Returns:
-
getPadding
int getPadding()Retrieve the structure's fields alignment, aka fields padding/packing.This value should not be negative. It is 0 if this object represents a union (no padding). In the general case, the value is
Integer.MAX_VALUE
to indicate that structure fields are aligned on the size of their underlying primitive types, i.e. "natural" padding. Example: a 4-byte integer field would be aligned on a 4-byte boundary. A padding value is value indicates that members are byte-aligned (i.e. not aligned); a padding value of 2 indicates members are aligned on at most 2-bytes, etc.- Returns:
-
getAlignment
int getAlignment()Retrieve the structure's actual global alignment. It may be bigger than the alignment set when the structure was created (if any was provided).- Returns:
-
getFieldsCount
int getFieldsCount()Get the number of fields.- Returns:
-
getFields
List<? extends IStructureTypeField> getFields()Get the list of true (non-synthetic) fields.- Returns:
-
getIndexOfField
Get the index of the provided field.- Parameters:
field
-- Returns:
-
getFieldsWithGaps
List<? extends IStructureTypeField> getFieldsWithGaps()Get a complete list of fields as well as gaps in-between fields (synthetic fields).- Returns:
-
getField
-
getFieldByName
-
getFieldAt
-
getFieldAt
-
getFieldOver
-
getFieldAfter
-
isCircular
-