Class ByteMatcher
java.lang.Object
ghidra.features.base.memsearch.matcher.ByteMatcher
- Direct Known Subclasses:
InvalidByteMatcher,MaskedByteSequenceByteMatcher,RegExByteMatcher
ByteMatcher is the base class for an object that be used to scan bytes looking for sequences
that match some criteria. As a convenience, it also stores the input string and settings that
were used to generated this ByteMatcher.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRecord class to contain a match specification. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanabstract StringReturns a description of what this byte matcher matches.final StringgetInput()Returns the original input text that generated this ByteMatacher.Returns the settings used to generate this ByteMatcher.abstract StringReturns additional information about this byte matcher.inthashCode()booleanReturns true if this byte matcher has valid (but possibly incomplete) input text.booleanReturns true if this byte matcher is valid and can be used to perform a search.abstract Iterable<ByteMatcher.ByteMatch> match(ExtendedByteSequence bytes) Returns anIterablefor returning matches within the given byte sequence.toString()
-
Constructor Details
-
ByteMatcher
-
-
Method Details
-
getInput
Returns the original input text that generated this ByteMatacher.- Returns:
- the original input text that generated this BytesMatcher
-
getSettings
Returns the settings used to generate this ByteMatcher.- Returns:
- the settings used to generate this ByteMatcher
-
match
Returns anIterablefor returning matches within the given byte sequence.- Parameters:
bytes- the byte sequence to search- Returns:
- an iterable for return matches in the given sequence
-
getDescription
Returns a description of what this byte matcher matches. (Typically a sequence of bytes)- Returns:
- a description of what this byte matcher matches
-
getToolTip
Returns additional information about this byte matcher. (Typically the mask bytes)- Returns:
- additional information about this byte matcher
-
isValidSearch
public boolean isValidSearch()Returns true if this byte matcher is valid and can be used to perform a search. If false, the description will return an error message explaining why this byte matcher is invalid.- Returns:
- true if this byte matcher is valid and can be used to perform a search.
-
isValidInput
public boolean isValidInput()Returns true if this byte matcher has valid (but possibly incomplete) input text. For example, when entering decimal values, the input could be just "-" as the user starts to enter a negative number. In this case the input is valid, but theisValidSearch()would return false.- Returns:
- true if this byte matcher has valid text
-
toString
-
hashCode
public int hashCode() -
equals
-