Record Class BpsTransformation
java.lang.Object
java.lang.Record
ghidra.util.bytesearch.bytepatternsearch.BpsTransformation
- Record Components:
endianness- of the patternextensionSize- word size the pattern was padded to (can be null)splitToSize- word size the pattern was split to (can be null)splitPartIndex- index of the split that this pattern represents (eg. index=1 indicates the first part of a split) (can be null)totalSplitParts- total count of all parts of a split pattern (can be null)
public record BpsTransformation(Endian endianness, Integer extensionSize, Integer splitToSize, Integer splitPartIndex, Integer totalSplitParts)
extends Record
This class records a byte pattern's transformation in support of Ghidra's Byte Pattern Search
capability.
The design of the Byte pattern Searcher and its supporting sub-capabilities and classes can be found in the "Search For Byte Patterns" page in the help viewer.
Indicates the structural state mutations which have been applied to a BpsPattern.
NOTE: Once patterns are generated, they do not change (instead, when transforming a pattern, a new pattern is generated and has its own transformation record) so pattern transformation records are not modifiable.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns Creates a copy of this record that uses the Little Endian setting.static BpsTransformationempty()Factory method for an unmodified baseline pattern.Returns the value of theendiannessrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theextensionSizerecord component.Returns the description of the pattern's transformation history.final inthashCode()Returns a hash code value for this object.Returns the value of thesplitPartIndexrecord component.Returns the value of thesplitToSizerecord component.toString()Returns a string representation of this record class.Returns the value of thetotalSplitPartsrecord component.
-
Constructor Details
-
BpsTransformation
public BpsTransformation(Endian endianness, Integer extensionSize, Integer splitToSize, Integer splitPartIndex, Integer totalSplitParts) Creates an instance of aBpsTransformationrecord class.- Parameters:
endianness- the value for theendiannessrecord componentextensionSize- the value for theextensionSizerecord componentsplitToSize- the value for thesplitToSizerecord componentsplitPartIndex- the value for thesplitPartIndexrecord componenttotalSplitParts- the value for thetotalSplitPartsrecord component
-
-
Method Details
-
empty
Factory method for an unmodified baseline pattern.NOTE: All patterns prior to any transformations are safely assumed to be big endian.
- Returns:
- the transformation
-
asLittleEndian
Returns Creates a copy of this record that uses the Little Endian setting.- Returns:
- Creates a copy of this record that uses the Little Endian setting
-
toString
-
getDescription
Returns the description of the pattern's transformation history.- Returns:
- the description of the pattern's transformation history
-
hashCode
-
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). -
endianness
Returns the value of theendiannessrecord component.- Returns:
- the value of the
endiannessrecord component
-
extensionSize
Returns the value of theextensionSizerecord component.- Returns:
- the value of the
extensionSizerecord component
-
splitToSize
Returns the value of thesplitToSizerecord component.- Returns:
- the value of the
splitToSizerecord component
-
splitPartIndex
Returns the value of thesplitPartIndexrecord component.- Returns:
- the value of the
splitPartIndexrecord component
-
totalSplitParts
Returns the value of thetotalSplitPartsrecord component.- Returns:
- the value of the
totalSplitPartsrecord component
-