Package aQute.bnd.component
Class DSAnnotations
- java.lang.Object
-
- aQute.bnd.component.DSAnnotations
-
- All Implemented Interfaces:
AnalyzerPlugin
public class DSAnnotations extends java.lang.Object implements AnalyzerPlugin
Analyze the class space for any classes that have an OSGi annotation for DS.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDSAnnotations.Options(package private) static classDSAnnotations.VersionSettings
-
Constructor Summary
Constructors Constructor Description DSAnnotations()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddExtenderRequirement(java.util.Set<java.lang.String> requires, Version version)private voidaddServiceCapability(ComponentDef definition, java.util.Set<java.lang.String> provides, boolean nouses)private voidaddServiceRequirement(ReferenceDef ref, MergedRequirement requires)booleananalyzeJar(Analyzer analyzer)This plugin is called after analysis.private voidcheckVersionConflicts(Analyzer analyzer, ComponentDef definition, DSAnnotations.VersionSettings settings)private voidmakeUnique(MultiMap<java.lang.String,ComponentDef> definitionsByName, ComponentDef definition)static java.util.List<java.lang.String>removeOverlapInServiceComponentHeader(java.util.Collection<java.lang.String> names)java.lang.StringtoString()private voidupdateHeader(Analyzer analyzer, java.lang.String name, java.util.TreeSet<java.lang.String> set)Updates specified header, sorting and removing duplicates.
-
-
-
Method Detail
-
analyzeJar
public boolean analyzeJar(Analyzer analyzer) throws java.lang.Exception
Description copied from interface:AnalyzerPluginThis plugin is called after analysis. The plugin is free to modify the jar and/or change the classpath information (see referred, contained). This plugin is called after analysis of the JAR but before manifest generation.- Specified by:
analyzeJarin interfaceAnalyzerPlugin- Returns:
- true if the classpace has been modified so that the bundle classpath must be reanalyzed
- Throws:
java.lang.Exception
-
checkVersionConflicts
private void checkVersionConflicts(Analyzer analyzer, ComponentDef definition, DSAnnotations.VersionSettings settings)
-
makeUnique
private void makeUnique(MultiMap<java.lang.String,ComponentDef> definitionsByName, ComponentDef definition)
-
removeOverlapInServiceComponentHeader
public static java.util.List<java.lang.String> removeOverlapInServiceComponentHeader(java.util.Collection<java.lang.String> names)
-
addServiceCapability
private void addServiceCapability(ComponentDef definition, java.util.Set<java.lang.String> provides, boolean nouses)
-
addServiceRequirement
private void addServiceRequirement(ReferenceDef ref, MergedRequirement requires)
-
addExtenderRequirement
private void addExtenderRequirement(java.util.Set<java.lang.String> requires, Version version)
-
updateHeader
private void updateHeader(Analyzer analyzer, java.lang.String name, java.util.TreeSet<java.lang.String> set)
Updates specified header, sorting and removing duplicates. Destroys contents of set parameter.- Parameters:
analyzer-name- header nameset- values to add to header; contents are not preserved.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-