Interface ResourceProvider
- All Known Subinterfaces:
Generator, Project, RootProject
- All Known Implementing Classes:
AbstractBndGenerator, AbstractGenerator, AbstractProject, AbstractProvider, BndAnalyzer, BndBaseliner, BootstrapBuild, BootstrapRoot, ClasspathScanner, EclipseConfigurator, JarBuilder, JavaCompiler, Javadoc, JavadocJarGenerator, JavaExecutor, JavaResourceCollector, JavaTool, JUnitTestRunner, LibraryBuilder, MvnPublisher, MvnRepoLookup, PomFileGenerator, ResourceCollector, SourcesJarGenerator, UberJarBuilder, VscodeConfigurator
public interface ResourceProvider
This interface defines access to a resource provider, in particular,
to the provider's resources. Resources are accessed by invoking
resources with a ResourceRequest. In addition, this
interface serves as a factory for creating the ResourceRequest
instances used for these invocations.
Note that this interface specifies how a provider is invoked. Resource
provider implementations must implement the ResourceProviderSpi.
-
Method Summary
Modifier and TypeMethodDescriptioncontext()Convenience method to access the build context which is sometimes needed in the context of resource requests.name()Returns the name of this resource provider.default <T extends Resource>
ResourceRequest<T> Create a new request for the given resource type.<T extends Resource>
ResourceRequest<T> of(ResourceType<? extends T> type) Create a new request for the given resource.resources(ResourceRequest<T> requested) Returns resources provided by this resource provider.
-
Method Details
-
name
-
resources
Returns resources provided by this resource provider. Short forcontext().resources(this, request).- Type Parameters:
T- the generic type- Parameters:
requested- the request- Returns:
- the stream
-
context
Convenience method to access the build context which is sometimes needed in the context of resource requests.- Returns:
- the builder configuration
-
of
Create a new request for the given resource.- Type Parameters:
T- the resource type- Parameters:
type- the type- Returns:
- the resource request
-
of
Create a new request for the given resource type.- Type Parameters:
T- the resource type- Parameters:
requested- the requested- Returns:
- the resource request
-