Class FromHelper
java.lang.Object
org.jdrupes.builder.api.FromHelper
Helper class for implementing
ResourceProvider.from(Stream).-
Constructor Summary
ConstructorsConstructorDescriptionFromHelper(BuildContext context, Stream<ResourceProvider> providers) Initializes a new from helper. -
Method Summary
Modifier and TypeMethodDescriptionget(ResourceRequest<T> request) Returns the requested resources using the context and providers passed to the record's constructor.log(Consumer<ResourceProvider> providerLog) Register a callback for logging the providers used.without(Class<? extends ResourceProvider> providerType) Exclude providers of the given type when requesting resources.without(ResourceProvider provider) Exclude the given provider when requesting resources.
-
Constructor Details
-
FromHelper
Initializes a new from helper.- Parameters:
context- the contextproviders- the providers
-
-
Method Details
-
without
Exclude the given provider when requesting resources.- Parameters:
provider- the provider- Returns:
- the from helper
-
without
Exclude providers of the given type when requesting resources.- Parameters:
providerType- the provider type- Returns:
- the from helper
-
log
Register a callback for logging the providers used.- Parameters:
providerLog- the provider log- Returns:
- the from helper
-
get
Returns the requested resources using the context and providers passed to the record's constructor.- Type Parameters:
T- the generic type- Parameters:
request- the request- Returns:
- the stream
-