Annotation Interface FieldOutput


@Retention(RUNTIME) @Target(FIELD) public @interface FieldOutput
Indicates that the tagged java field is to be included when constructing a variable length Ghidra structure data type.

Using this annotation on a field indicates that the containing Ghidra structure has variable length fields, and the containing class must implement the StructureReader interface to allow deserialization of instances of the containing class.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Specifies the name of a Ghidra DataType that will be used for this field when creating a Ghidra structure.
     
    Specifies a method that will return a Ghidra DataType that should be used for this field when creating a Ghidra structure.
    boolean
    Marks this field as variable length, which will cause the Ghidra structure containing this field to have a "_NN" name suffix that specifies the length of this instance.
    int
     
    int
     
  • Element Details

    • fieldOutputFunc

      Class<? extends FieldOutputFunction> fieldOutputFunc
      Default:
      ghidra.app.util.bin.format.golang.structmapping.FieldOutputFunction.class
    • ordinal

      int ordinal
      Default:
      -1
    • offset

      int offset
      Default:
      -1
    • dataTypeName

      String dataTypeName
      Specifies the name of a Ghidra DataType that will be used for this field when creating a Ghidra structure.
      Returns:
      Default:
      ""
    • isVariableLength

      boolean isVariableLength
      Marks this field as variable length, which will cause the Ghidra structure containing this field to have a "_NN" name suffix that specifies the length of this instance.
      Returns:
      Default:
      false
    • getter

      String getter
      Specifies a method that will return a Ghidra DataType that should be used for this field when creating a Ghidra structure.
      Returns:
      Default:
      ""