Class ResourceCollector<T extends Resource>
java.lang.Object
org.jdrupes.builder.core.AbstractProvider
org.jdrupes.builder.core.AbstractGenerator
org.jdrupes.builder.core.ResourceCollector<T>
- Type Parameters:
T- the resource type
- All Implemented Interfaces:
Generator, ResourceProvider
- Direct Known Subclasses:
JavaResourceCollector
A provider of resources to be included in a project. This
implementation can be used for all kinds of resources. Usually
language specific packages derive specializations that bind
this class to a specific type of resource. These specializations
often also offer methods that ease the specification of resources
to be included.
-
Field Summary
Fields inherited from class AbstractProvider
log -
Constructor Summary
ConstructorsConstructorDescriptionResourceCollector(Project project, ResourceType<T> type) Instantiates a new resources collector. -
Method Summary
Modifier and TypeMethodDescriptionfinal ResourceCollector<T> Adds the given file trees with resource directories.final ResourceCollector<T> Adds the given file tree with resource directories.doProvide(ResourceRequest<R> requested) Invoked byAbstractProvider.provide(ResourceRequest)after checking if the invocation is allowed.Return the resources to collect.Methods inherited from class AbstractGenerator
cleanup, name, name, newResource, project, toStringMethods inherited from class AbstractProvider
provideMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ResourceProvider
provide
-
Constructor Details
-
ResourceCollector
Instantiates a new resources collector.- Parameters:
project- the projecttype- the type of resources to collect
-
-
Method Details
-
add
Adds the given file tree with resource directories.- Parameters:
resources- the resources- Returns:
- the resources collector
-
add
Adds the given file trees with resource directories.- Parameters:
resources- the resources- Returns:
- the resources collector
-
resources
-
doProvide
Description copied from class:AbstractProviderInvoked byAbstractProvider.provide(ResourceRequest)after checking if the invocation is allowed.- Specified by:
doProvidein classAbstractProvider- Type Parameters:
R- the generic type- Parameters:
requested- the requested- Returns:
- the stream
-