Class AbstractProvider
java.lang.Object
org.jdrupes.builder.core.AbstractProvider
- All Implemented Interfaces:
ResourceProvider
- Direct Known Subclasses:
AbstractGenerator, AbstractProject, MvnRepoLookup
A base implementation for
ResourceProviders.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoProvide(ResourceRequest<T> requested) Invoked byprovide(ResourceRequest)after checking if the invocation is allowed.provide(ResourceRequest<T> requested) Checks if the the current thread executes a provider invocation fromBuildContext.get(ResourceProvider, ResourceRequest).toString()
-
Field Details
-
log
-
-
Constructor Details
-
AbstractProvider
public AbstractProvider()Initializes a new abstract provider.
-
-
Method Details
-
provide
Checks if the the current thread executes a provider invocation fromBuildContext.get(ResourceProvider, ResourceRequest). Generates a warning if the invocation is not allowed. Then invokesdoProvide(ResourceRequest).- Specified by:
providein interfaceResourceProvider- Type Parameters:
T- the type of the requested (and provided) resource- Parameters:
requested- the requested resources- Returns:
- true, if allowed
-
doProvide
Invoked byprovide(ResourceRequest)after checking if the invocation is allowed.- Type Parameters:
T- the generic type- Parameters:
requested- the requested- Returns:
- the stream
-
toString
-