Class InvalidByteMatcher
java.lang.Object
ghidra.features.base.memsearch.matcher.ByteMatcher
ghidra.features.base.memsearch.matcher.InvalidByteMatcher
Objects of this class are the result of
SearchFormat
s not being able to fully parse
input text. There are two cases. The first is the user type an illegal character for the
selected search format. In that case this matcher is both an invalid search and an invalid
input and the description will explain the error. The second case is the input is valid text,
but not complete so that a fully valid byte matcher could not be created. In this case, the
search is still invalid, but the input is valid. The description will reflect this situation.-
Nested Class Summary
Nested classes/interfaces inherited from class ghidra.features.base.memsearch.matcher.ByteMatcher
ByteMatcher.ByteMatch
-
Constructor Summary
ConstructorDescriptionInvalidByteMatcher
(String errorMessage) Construct an invalid matcher from invalid input text.InvalidByteMatcher
(String errorMessage, boolean isValidInput) Construct an invalid matcher from invalid input text or partial input text. -
Method Summary
Modifier and TypeMethodDescriptionReturns a description of what this byte matcher matches.Returns additional information about this byte matcher.boolean
Returns true if this byte matcher has valid (but possibly incomplete) input text.boolean
Returns true if this byte matcher is valid and can be used to perform a search.match
(ExtendedByteSequence bytes) Returns anIterable
for returning matches within the given byte sequence.Methods inherited from class ghidra.features.base.memsearch.matcher.ByteMatcher
equals, getInput, getSettings, hashCode, toString
-
Constructor Details
-
InvalidByteMatcher
Construct an invalid matcher from invalid input text.- Parameters:
errorMessage
- the message describing the invalid input
-
InvalidByteMatcher
Construct an invalid matcher from invalid input text or partial input text.- Parameters:
errorMessage
- the message describing why this matcher is invalidisValidInput
- return true if the reason this is invalid is simply that the input text is not complete. For example, the user types "-" as they are starting to input a negative number.
-
-
Method Details
-
match
Description copied from class:ByteMatcher
Returns anIterable
for returning matches within the given byte sequence.- Specified by:
match
in classByteMatcher
- Parameters:
bytes
- the byte sequence to search- Returns:
- an iterable for return matches in the given sequence
-
getDescription
Description copied from class:ByteMatcher
Returns a description of what this byte matcher matches. (Typically a sequence of bytes)- Specified by:
getDescription
in classByteMatcher
- Returns:
- a description of what this byte matcher matches
-
getToolTip
Description copied from class:ByteMatcher
Returns additional information about this byte matcher. (Typically the mask bytes)- Specified by:
getToolTip
in classByteMatcher
- Returns:
- additional information about this byte matcher
-
isValidInput
public boolean isValidInput()Description copied from class:ByteMatcher
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 theByteMatcher.isValidSearch()
would return false.- Overrides:
isValidInput
in classByteMatcher
- Returns:
- true if this byte matcher has valid text
-
isValidSearch
public boolean isValidSearch()Description copied from class:ByteMatcher
Returns true if this byte matcher is valid and can be used to perform a search. If false, the the description will return a an error message explaining why this byte matcher is invalid.- Overrides:
isValidSearch
in classByteMatcher
- Returns:
- true if this byte matcher is valid and can be used to perform a search.
-