Class OsgiAnalyzer
java.lang.Object
org.jdrupes.builder.core.AbstractProvider
org.jdrupes.builder.core.AbstractGenerator
org.jdrupes.builder.bnd.OsgiAnalyzer
- All Implemented Interfaces:
Generator, Renamable, ResourceProvider
A provider that computes OSGi attributes. It does not provide any
resources. Rather it analyzes the resources of the project and computes
OSGi attributes for the bundle to be eventually built by
LibraryBuilder.
The analyzer first requests the resources of type ClassTree supplied
to the project. The classes obtained are assumed to be the content of the
bundle. It then requests the resources of type LibraryJarFile
from the project's dependencies with intent Consume and Expose.
These are considered the external dependencies of the bundle.
The data is analyzed and provides the requested attributes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the attributes computed by the analyzer.doProvide(ResourceRequest<T> requested) Invoked byResourceProviderSpi.provide(ResourceRequest)after checking if the invocation is allowed.Methods inherited from class AbstractGenerator
cleanup, name, newResource, project, toStringMethods inherited from class AbstractProvider
context, name, of, rename, vavrStream
-
Constructor Details
-
OsgiAnalyzer
Initializes a new osgi analyzer.- Parameters:
project- the project
-
-
Method Details
-
attributes
Returns the attributes computed by the analyzer.- Returns:
- the stream
-
doProvide
Description copied from class:AbstractProviderInvoked byResourceProviderSpi.provide(ResourceRequest)after checking if the invocation is allowed.- Specified by:
doProvidein classAbstractProvider- Type Parameters:
T- the generic type- Parameters:
requested- the requested- Returns:
- the stream
-