Class NameListResourceProvider
- java.lang.Object
-
- migratedb.v1.core.internal.resource.NameListResourceProvider
-
- All Implemented Interfaces:
ResourceProvider
- Direct Known Subclasses:
ClassPathResourceProvider
public abstract class NameListResourceProvider extends Object implements ResourceProvider
-
-
Constructor Summary
Constructors Constructor Description NameListResourceProvider(Collection<String> names)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete 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.protected abstract ResourcetoResource(String name)
-
-
-
Constructor Detail
-
NameListResourceProvider
public NameListResourceProvider(Collection<String> names)
-
-
Method Detail
-
getResource
public final @Nullable Resource getResource(String name)
Description copied from interface:ResourceProviderRetrieves the resource with this name.- Specified by:
getResourcein interfaceResourceProvider- Parameters:
name- The name of the resource.- Returns:
- The resource or
nullif not found.
-
getResources
public final Collection<Resource> getResources(String prefix, Collection<String> suffixes)
Description copied from interface:ResourceProviderRetrieve all resources whose last name component begins with this prefix and ends with any of these suffixes.- Specified by:
getResourcesin interfaceResourceProvider- Parameters:
prefix- The prefix.suffixes- The suffixes.- Returns:
- The matching resources.
-
-