Interface IStructureTypeField


@Ser public interface IStructureTypeField
Item representing the field of a structure type.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    This flag indicates that the field is anonymous (it does not have a meaningful name).
    static final int
    This hint indicates that the field's value may be an offset relative to a memory base.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get the alignment requirement for this field.
    int
    Reserved for bit fields.
    int
    Reserved for bit fields.
    int
    Reserved for bit fields.
    int
    Convenience method returning the end offset (exclusive) of the field.
    int
    Retrieve the field flags.
    Get the field name.
    getName(boolean includeBitfield)
    Get the field name.
    int
    Get the field offset within the structure.
    int
    Get the field effective size (not counting padding, ie following gap bytes) in bytes.
    Get the field type.
    boolean
     
    boolean
    Determine if this field is a bit field.
    boolean
    A synthetic field is an artificial field that represents a gap item, ie the unused space between two real structure field.
  • Field Details

    • FLAG_HINT_RVA

      static final int FLAG_HINT_RVA
      This hint indicates that the field's value may be an offset relative to a memory base.
      See Also:
    • FLAG_ANONYMOUS

      static final int FLAG_ANONYMOUS
      This flag indicates that the field is anonymous (it does not have a meaningful name).
      See Also:
  • Method Details

    • isSynthetic

      boolean isSynthetic()
      A synthetic field is an artificial field that represents a gap item, ie the unused space between two real structure field.
      Returns:
    • isAnonymous

      boolean isAnonymous()
      Returns:
    • getName

      String getName()
      Get the field name.
      Returns:
      the name, never null
    • getName

      String getName(boolean includeBitfield)
      Get the field name.
      Parameters:
      includeBitfield -
      Returns:
      the name, never null
    • getType

      INativeType getType()
      Get the field type. A synthetic field has not type.
      Returns:
      the type, or null for a synthetic field
    • getOffset

      int getOffset()
      Get the field offset within the structure. Note that is this is a union-field, the value returned will always be zero.
      Returns:
    • getSize

      int getSize()
      Get the field effective size (not counting padding, ie following gap bytes) in bytes. If the field is a bitfield, the full field size is returned. Eg, "int a:1" could return 4.
      Returns:
    • getEndOffset

      int getEndOffset()
      Convenience method returning the end offset (exclusive) of the field. The value returned is getOffset() + getSize(). If padding follows the field, the returned offset points to the first padding byte.
      Returns:
    • isBitfield

      boolean isBitfield()
      Determine if this field is a bit field.
      Returns:
    • getBitstart

      int getBitstart()
      Reserved for bit fields.
      Returns:
    • getBitsize

      int getBitsize()
      Reserved for bit fields.
      Returns:
    • getBitend

      int getBitend()
      Reserved for bit fields.
      Returns:
    • getAlignment

      int getAlignment()
      Get the alignment requirement for this field.
      Returns:
      0 if none, else a byte value specifying the alignment requirement for this field
    • getFlags

      int getFlags()
      Retrieve the field flags.
      Returns:
      a bitfield of FLAG_xxx constants