# Interface: com.pnfsoftware.jeb.core.units.code.asm.type.IStructureType

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](IStructureType#getTypeManager()).

## Method: getAlignment
- return type: `int`

Description: Retrieve the structure's actual global alignment. It may be bigger than the alignment set when the structure was created \(if any was provided\).
return: alignment in bytes

## Method: getField
- parameter: `index`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureTypeField`

Description: Retrieve a field by index.
parameter: index: field index
return: field, or null

## Method: getFieldAfter
- parameter: `offset`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureTypeField`

Description: Retrieve the first field after an offset.
parameter: offset: offset to test
return: field, or null

## Method: getFieldAt
- parameter: `offset`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureTypeField`

Description: Retrieve a field starting at an offset.
parameter: offset: field offset
return: field, or null

## Method: getFieldAt
- parameter: `offset`, type: `int`
- parameter: `bitstart`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureTypeField`

Description: Retrieve a bit field starting at an offset and bit position.
parameter: offset: field offset
parameter: bitstart: bit start
return: field, or null

## Method: getFieldByName
- parameter: `name`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureTypeField`

Description: Retrieve a field by name.
parameter: name: field name
return: field, or null

## Method: getFieldOver
- parameter: `offset`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureTypeField`

Description: Retrieve a field spanning an offset.
parameter: offset: offset to test
return: field, or null

## Method: getFields
- return type: `java.util.List<? extends com.pnfsoftware.jeb.core.units.code.asm.type.IStructureTypeField>`

Description: Get the list of true \(non\-synthetic\) fields.
return: true fields

## Method: getFieldsCount
- return type: `int`

Description: Get the number of fields.
return: field count

## Method: getFieldsWithGaps
- return type: `java.util.List<? extends com.pnfsoftware.jeb.core.units.code.asm.type.IStructureTypeField>`

Description: Get a complete list of fields as well as gaps in\-between fields \(synthetic fields\).
return: fields including synthetic gaps

## Method: getIndexOfField
- parameter: `field`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureTypeField`
- return type: `int`

Description: Get the index of the provided field.
parameter: field: field to locate
return: field index, or \-1

## Method: getPadding
- return type: `int`

Description: 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](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.
return: padding in bytes, or 0 for a union

## Method: isCircular
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.INativeType`
- return type: `boolean`

Description: Determine whether using a type would make this structure circular.
parameter: type: candidate field type
return: true if the type would create a circular reference

## Method: isStructure
- return type: `boolean`

Description: Determine whether this type is a structure \(not a union\).
return: true if this type is a structure

## Method: isUnion
- return type: `boolean`

Description: Determine whether this type is a union \(not a structure\).
return: true if this type is a union

