Record Class FieldContext<T>
java.lang.Object
java.lang.Record
ghidra.app.util.bin.format.golang.structmapping.FieldContext<T>
- Type Parameters:
T- the class that contains this field
public record FieldContext<T>(StructureContext<T> structureContext, FieldMappingInfo<T> fieldInfo, DataTypeComponent dtc, BinaryReader reader)
extends Record
Context of an individual field that is being deserialized
-
Constructor Summary
ConstructorsConstructorDescriptionFieldContext(StructureContext<T> structureContext, FieldMappingInfo<T> fieldInfo, DataTypeComponent dtc, BinaryReader reader) Creates an instance of aFieldContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddReference(Address refDest) voidappendComment(int commentType, String prefix, String comment, String sep) dtc()Returns the value of thedtcrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefieldInforecord component.<R> Rfinal inthashCode()Returns a hash code value for this object.reader()Returns the value of thereaderrecord component.Returns the value of thestructureContextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FieldContext
public FieldContext(StructureContext<T> structureContext, FieldMappingInfo<T> fieldInfo, DataTypeComponent dtc, BinaryReader reader) Creates an instance of aFieldContextrecord class.- Parameters:
structureContext- the value for thestructureContextrecord componentfieldInfo- the value for thefieldInforecord componentdtc- the value for thedtcrecord componentreader- the value for thereaderrecord component
-
-
Method Details
-
getStructureInstance
-
getDataTypeMapper
-
appendComment
public void appendComment(int commentType, String prefix, String comment, String sep) throws IOException - Throws:
IOException
-
addReference
- Throws:
IOException
-
getAddress
-
getValue
- Throws:
IOException
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
structureContext
Returns the value of thestructureContextrecord component.- Returns:
- the value of the
structureContextrecord component
-
fieldInfo
Returns the value of thefieldInforecord component.- Returns:
- the value of the
fieldInforecord component
-
dtc
Returns the value of thedtcrecord component.- Returns:
- the value of the
dtcrecord component
-
reader
Returns the value of thereaderrecord component.- Returns:
- the value of the
readerrecord component
-