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

# Class MultiPayloadEnumDescriptor

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

All Implemented Interfaces:
  `SwiftStructure`, `StructConverter`

public final class MultiPayloadEnumDescriptor extends Object implements SwiftStructure
Represents a Swift MultiPayloadEnumDescriptor 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 `MultiPayloadEnumDescriptor` 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
  `MultiPayloadEnumDescriptor(BinaryReader reader)`
  Creates a new `MultiPayloadEnumDescriptor`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int[]`
  `getContents()`
  Gets the contents
  `long`
  `getContentsSize()`
  Gets the size of the contents in bytes
  `String`
  `getDescription()`
  Gets a short description of the `SwiftStructure`
  `String`
  `getStructureName()`
  Gets the name of the `SwiftStructure`
  `String`
  `getTypeName()`
  Gets the type name
  `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 `MultiPayloadEnumDescriptor` structure. This size does not take into account the size of the `contents` array.
    See Also:
      - `getContentsSize()`
      - Constant Field Values

- ## Constructor Details

  - ### MultiPayloadEnumDescriptor

    public MultiPayloadEnumDescriptor(BinaryReader reader) throws IOException
    Creates a new `MultiPayloadEnumDescriptor`
    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

  - ### getTypeName

    public String getTypeName()
    Gets the type name
    Returns:
      The type name

  - ### getContents

    public int[] getContents()
    Gets the contents
    Returns:
      The contents

  - ### getContentsSize

    public long getContentsSize()
    Gets the size of the contents in bytes
    Returns:
      The size of the contents in bytes

  - ### 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`