Class SearchLocationRegistry
java.lang.Object
ghidra.app.util.bin.format.dwarf.external.SearchLocationRegistry
List of
SearchLocation
types that can be saved / restored from a configuration string.-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionSearchLocationRegistry
(boolean registerDefault) Creates a new registry, optionally registering the default SearchLocations. -
Method Summary
Modifier and TypeMethodDescriptioncreateSearchLocation
(String locString, SearchLocationCreatorContext context) Creates aSearchLocation
using the provided location string.static SearchLocationRegistry
newContext
(Program program) Creates a newcontext
.void
register
(Predicate<String> testFunc, SearchLocationRegistry.SearchLocationCreator createFunc) Adds aSearchLocation
to this registry.
-
Constructor Details
-
SearchLocationRegistry
public SearchLocationRegistry(boolean registerDefault) Creates a new registry, optionally registering the default SearchLocations.- Parameters:
registerDefault
- boolean flag, if true register the built-inSearchLocation
s
-
-
Method Details
-
getInstance
-
register
public void register(Predicate<String> testFunc, SearchLocationRegistry.SearchLocationCreator createFunc) Adds aSearchLocation
to this registry.- Parameters:
testFunc
- aPredicate
that tests a location string, returning true if the string specifies the SearchLocation in questioncreateFunc
- aSearchLocationRegistry.SearchLocationCreator
that will create a newSearchLocation
instance given a location string and acontext
-
newContext
Creates a newcontext
.- Parameters:
program
-Program
- Returns:
- new
SearchLocationCreatorContext
-
createSearchLocation
Creates aSearchLocation
using the provided location string.- Parameters:
locString
- location string (previously returned bySearchLocation.getName()
context
- acontext
- Returns:
- new
SearchLocation
instance, or null if there are no registered matching SearchLocations
-