Class SearchLocationRegistry
- java.lang.Object
-
- ghidra.app.util.bin.format.dwarf4.external.SearchLocationRegistry
-
public class SearchLocationRegistry extends java.lang.ObjectList ofSearchLocationtypes that can be saved / restored from a configuration string.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSearchLocationRegistry.SearchLocationCreator
-
Constructor Summary
Constructors Constructor Description SearchLocationRegistry(boolean registerDefault)Creates a new registry, optionally registering the default SearchLocations.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchLocationcreateSearchLocation(java.lang.String locString, SearchLocationCreatorContext context)Creates aSearchLocationusing the provided location string.static SearchLocationRegistrygetInstance()SearchLocationCreatorContextnewContext(Program program)Creates a newcontext.voidregister(java.util.function.Predicate<java.lang.String> testFunc, SearchLocationRegistry.SearchLocationCreator createFunc)Adds aSearchLocationto this registry.
-
-
-
Constructor Detail
-
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 Detail
-
getInstance
public static SearchLocationRegistry getInstance()
-
register
public void register(java.util.function.Predicate<java.lang.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
public SearchLocationCreatorContext newContext(Program program)
Creates a newcontext.- Parameters:
program-Program- Returns:
- new
SearchLocationCreatorContext
-
createSearchLocation
public SearchLocation createSearchLocation(java.lang.String locString, SearchLocationCreatorContext context)
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
-
-