Package ghidra.app.util.bin.format.golang.structmapping

# Class FieldMappingInfo<T>

java.lang.Object
ghidra.app.util.bin.format.golang.structmapping.FieldMappingInfo<T>

Type Parameters:
  `T` - structure mapped class type

public class FieldMappingInfo<T> extends Object
Immutable information needed to deserialize a field in a structure mapped class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addCommentMarkupFuncs()`
  `void`
  `addMarkupFunc(FieldMarkupFunction<T> func)`
  `void`
  `addMarkupNestedFuncs()`
  `void`
  `addMarkupReferenceFunc()`
  `void`
  `assignField(FieldContext<T> fieldContext, Object value)`
  `static <T> FieldMappingInfo<T>`
  `createEarlyBinding(Field field, DataTypeComponent dtc, Signedness signedness, int length)`
  Creates a FieldMappingInfo instance, used when the structure is not variable length.
  `static <T> FieldMappingInfo<T>`
  `createLateBinding(Field field, String fieldName, Signedness signedness, int length)`
  Creates a FieldMappingInfo instance, used when the structure is variable length and there is no pre-defined Ghidra Structure data type.
  `DataTypeComponent`
  `findDtc(Structure struct)`
  `DataTypeComponent`
  `getDtc()`
  `DataTypeComponent`
  `getDtc(Structure structure)`
  `Field`
  `getField()`
  `String`
  `getFieldName()`
  `int`
  `getLength()`
  `List<FieldMarkupFunction<T>>`
  `getMarkupFuncs()`
  `FieldReadFunction<T>`
  `getReaderFunc()`
  `Signedness`
  `getSignedness()`
  `<R> R`
  `getValue(T structInstance, Class<R> expectedType)`
  `boolean`
  `isStructureMappedType()`
  `boolean`
  `isUnsigned()`
  `void`
  `setFieldValueDeserializationInfo(Class<? extends FieldReadFunction> fieldReadValueClass, Class<?> structTargetClass, String setterNameOverride)`

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

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

- ## Method Details

  - ### createEarlyBinding

    public static <T> FieldMappingInfo<T> createEarlyBinding(Field field, DataTypeComponent dtc, Signedness signedness, int length)
    Creates a FieldMappingInfo instance, used when the structure is not variable length.
    Type Parameters:
      `T` - structure mapped class type
    Parameters:
      `field` - java field
      `dtc` - Ghidra structure field
      `signedness` - `Signedness` enum
      `length` - override of structure field, or -1
    Returns:
      new `FieldMappingInfo` instance

  - ### createLateBinding

    public static <T> FieldMappingInfo<T> createLateBinding(Field field, String fieldName, Signedness signedness, int length)
    Creates a FieldMappingInfo instance, used when the structure is variable length and there is no pre-defined Ghidra Structure data type.
    Type Parameters:
      `T` - structure mapped class type
    Parameters:
      `field` - java field
      `fieldName` - name of Ghidra structure field
      `signedness` - `Signedness` enum
      `length` - override of structure field, or -1
    Returns:
      new `FieldMappingInfo` instance

  - ### getField

    public Field getField()

  - ### getFieldName

    public String getFieldName()

  - ### getDtc

    public DataTypeComponent getDtc()

  - ### getDtc

    public DataTypeComponent getDtc(Structure structure)

  - ### findDtc

    public DataTypeComponent findDtc(Structure struct)

  - ### getReaderFunc

    public FieldReadFunction<T> getReaderFunc()

  - ### getMarkupFuncs

    public List<FieldMarkupFunction<T>> getMarkupFuncs()

  - ### addMarkupFunc

    public void addMarkupFunc(FieldMarkupFunction<T> func)

  - ### getLength

    public int getLength()

  - ### getSignedness

    public Signedness getSignedness()

  - ### isUnsigned

    public boolean isUnsigned()

  - ### isStructureMappedType

    public boolean isStructureMappedType()

  - ### getValue

    public <R> R getValue(T structInstance, Class<R> expectedType) throws IOException
    Throws:
      `IOException`

  - ### addMarkupNestedFuncs

    public void addMarkupNestedFuncs()

  - ### addMarkupReferenceFunc

    public void addMarkupReferenceFunc()

  - ### addCommentMarkupFuncs

    public void addCommentMarkupFuncs()

  - ### setFieldValueDeserializationInfo

    public void setFieldValueDeserializationInfo(Class<? extends FieldReadFunction> fieldReadValueClass, Class<?> structTargetClass, String setterNameOverride)

  - ### assignField

    public void assignField(FieldContext<T> fieldContext, Object value) throws IOException
    Throws:
      `IOException`