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
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSearchLocationRegistry(boolean registerDefault) Creates a new registry, optionally registering the default SearchLocations. -
Method Summary
Modifier and TypeMethodDescriptioncreateSearchLocation(String locString, SearchLocationCreatorContext context) Creates aSearchLocationusing the provided location string.static SearchLocationRegistrynewContext(Program program) Creates a newcontext.voidregister(Predicate<String> testFunc, SearchLocationRegistry.SearchLocationCreator createFunc) Adds aSearchLocationto 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-inSearchLocations
-
-
Method Details
-
getInstance
-
register
public void register(Predicate<String> testFunc, SearchLocationRegistry.SearchLocationCreator createFunc) Adds aSearchLocationto this registry.- Parameters:
testFunc- aPredicatethat tests a location string, returning true if the string specifies the SearchLocation in questioncreateFunc- aSearchLocationRegistry.SearchLocationCreatorthat will create a newSearchLocationinstance given a location string and acontext
-
newContext
Creates a newcontext.- Parameters:
program-Program- Returns:
- new
SearchLocationCreatorContext
-
createSearchLocation
Creates aSearchLocationusing the provided location string.- Parameters:
locString- location string (previously returned bySearchLocation.getName()context- acontext- Returns:
- new
SearchLocationinstance, or null if there are no registered matching SearchLocations
-