Package migratedb.v1.core.api
Interface ResourceProvider
-
- All Known Implementing Classes:
ClassPathResourceProvider,FileSystemResourceProvider,LocationScanner,NameListResourceProvider
public interface ResourceProviderA facility to obtain loadable resources.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable ResourcegetResource(String name)Retrieves the resource with this name.Collection<Resource>getResources(String prefix, Collection<String> suffixes)Retrieve all resources whose last name component begins with this prefix and ends with any of these suffixes.static ResourceProvidernoResources()
-
-
-
Method Detail
-
getResource
@Nullable Resource getResource(String name)
Retrieves the resource with this name.- Parameters:
name- The name of the resource.- Returns:
- The resource or
nullif not found.
-
getResources
Collection<Resource> getResources(String prefix, Collection<String> suffixes)
Retrieve all resources whose last name component begins with this prefix and ends with any of these suffixes.- Parameters:
prefix- The prefix.suffixes- The suffixes.- Returns:
- The matching resources.
-
noResources
static ResourceProvider noResources()
- Returns:
- Instance that never provides any resources.
-
-