Class FieldOutputInfo<T>

java.lang.Object
ghidra.app.util.bin.format.golang.structmapping.FieldOutputInfo<T>
Type Parameters:
T - structure mapped class type

public class FieldOutputInfo<T> extends Object
Immutable information needed to create fields in a Ghidra structure data type, using information from a java field.
  • Constructor Details

    • FieldOutputInfo

      public FieldOutputInfo(FieldMappingInfo<T> fmi, String dataTypeName, boolean isVariableLength, int ordinal, int fieldOffset)
  • Method Details

    • getField

      public Field getField()
    • getOrdinal

      public int getOrdinal()
    • isVariableLength

      public boolean isVariableLength()
    • getOutputFunc

      public FieldOutputFunction<T> getOutputFunc()
    • getValue

      public <R> R getValue(T structInstance, Class<R> expectedType) throws IOException
      Returns the value of this java field.
      Type Parameters:
      R - type of the result value
      Parameters:
      structInstance - object containing the field
      expectedType - expected class of the value
      Returns:
      value of the field, or null if the field's value is not of expected type
      Throws:
      IOException - if error accessing java field
    • setOutputFuncClass

      public void setOutputFuncClass(Class<? extends FieldOutputFunction> funcClass, String getterName)