Class FieldMappingInfo<T>
java.lang.Object
ghidra.app.util.bin.format.golang.structmapping.FieldMappingInfo<T>
- Type Parameters:
T
- structure mapped class type
Immutable information needed to deserialize a field in a structure mapped class.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addMarkupFunc
(FieldMarkupFunction<T> func) void
void
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.getDtc()
getField()
int
<R> R
boolean
boolean
void
setFieldValueDeserializationInfo
(Class<? extends FieldReadFunction> fieldReadValueClass, Class<?> structTargetClass, String setterNameOverride)
-
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 fielddtc
- Ghidra structure fieldsignedness
-Signedness
enumlength
- 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 fieldfieldName
- name of Ghidra structure fieldsignedness
-Signedness
enumlength
- override of structure field, or -1- Returns:
- new
FieldMappingInfo
instance
-
getField
-
getFieldName
-
getDtc
-
getDtc
-
findDtc
-
getReaderFunc
-
getMarkupFuncs
-
addMarkupFunc
-
getLength
public int getLength() -
getSignedness
-
isUnsigned
public boolean isUnsigned() -
isStructureMappedType
public boolean isStructureMappedType() -
getValue
- 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
- Throws:
IOException
-