Package ghidra.app.util.bin.format.swift.types

# Class FieldRecord

java.lang.Object
ghidra.app.util.bin.format.swift.types.FieldRecord

All Implemented Interfaces:
  `SwiftStructure`, `StructConverter`

public final class FieldRecord extends Object implements SwiftStructure
Represents a Swift FieldRecord structure

See Also:
  - swift/RemoteInspection/Records.h

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `SIZE`
  The size (in bytes) of a `FieldRecord` structure

  ### Fields inherited from interface ghidra.app.util.bin.StructConverter

  `ASCII, BYTE, DWORD, IBO32, IBO64, POINTER, QWORD, SLEB128, STRING, ULEB128, UTF16, UTF8, VOID, WORD`

  ### Fields inherited from interface ghidra.app.util.bin.format.swift.SwiftStructure

  `DATA_TYPE_CATEGORY`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FieldRecord(BinaryReader reader)`
  Creates a new `FieldRecord`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getDescription()`
  Gets a short description of the `SwiftStructure`
  `String`
  `getFieldName()`
  Gets the field name
  `int`
  `getFlags()`
  Gets the flags
  `String`
  `getMangledTypeName()`
  Gets the mangled type name
  `String`
  `getStructureName()`
  Gets the name of the `SwiftStructure`
  `DataType`
  `toDataType()`
  Returns a structure datatype representing the contents of the implementor of this interface.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### SIZE

    public static final int SIZE
    The size (in bytes) of a `FieldRecord` structure
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### FieldRecord

    public FieldRecord(BinaryReader reader) throws IOException
    Creates a new `FieldRecord`
    Parameters:
      `reader` - A `BinaryReader` positioned at the start of the structure
    Throws:
      `IOException` - if there was an IO-related problem creating the structure

- ## Method Details

  - ### getFlags

    public int getFlags()
    Gets the flags
    Returns:
      The flags

  - ### getMangledTypeName

    public String getMangledTypeName()
    Gets the mangled type name
    Returns:
      The mangled type name

  - ### getFieldName

    public String getFieldName()
    Gets the field name
    Returns:
      The field name

  - ### getStructureName

    public String getStructureName()
    Description copied from interface: `SwiftStructure`
    Gets the name of the `SwiftStructure`
    Specified by:
      `getStructureName` in interface `SwiftStructure`
    Returns:
      The name of the `SwiftStructure`

  - ### getDescription

    public String getDescription()
    Description copied from interface: `SwiftStructure`
    Gets a short description of the `SwiftStructure`
    Specified by:
      `getDescription` in interface `SwiftStructure`
    Returns:
      A short description of the `SwiftStructure`

  - ### toDataType

    public DataType toDataType() throws DuplicateNameException, IOException
    Description copied from interface: `StructConverter`
    Returns a structure datatype representing the contents of the implementor of this interface.

    For example, given:

         class A {
             int foo;
             double bar;
         }

    The return value should be a structure data type with two data type components; an INT and a DOUBLE. The structure should contain field names and, if possible, field comments.

    Specified by:
      `toDataType` in interface `StructConverter`
    Returns:
      returns a structure datatype representing the implementor of this interface
    Throws:
      `DuplicateNameException` - when a datatype of the same name already exists
      `IOException`
    See Also:
      - `StructureDataType`