Class AnnotationPlugin
java.lang.Object
org.apache.felix.dm.annotation.plugin.bnd.AnnotationPlugin
- All Implemented Interfaces:
aQute.bnd.service.AnalyzerPlugin,aQute.bnd.service.OrderedPlugin,aQute.bnd.service.Plugin
public class AnnotationPlugin
extends Object
implements aQute.bnd.service.AnalyzerPlugin, aQute.bnd.service.Plugin
This class is a BND plugin. It scans the target bundle and look for DependencyManager annotations.
It can be directly used when using ant and can be referenced inside the ".bnd" descriptor, using
the "-plugin" parameter.
- Author:
- Felix Project Team
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleananalyzeJar(aQute.bnd.osgi.Analyzer analyzer) This plugin is called after analysis of the JAR but before manifest generation.voidsetProperties(Map<String, String> map) voidsetReporter(aQute.service.reporter.Reporter reporter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface aQute.bnd.service.OrderedPlugin
ordering
-
Constructor Details
-
AnnotationPlugin
public AnnotationPlugin()
-
-
Method Details
-
setReporter
public void setReporter(aQute.service.reporter.Reporter reporter) - Specified by:
setReporterin interfaceaQute.bnd.service.Plugin
-
setProperties
- Specified by:
setPropertiesin interfaceaQute.bnd.service.Plugin
-
analyzeJar
This plugin is called after analysis of the JAR but before manifest generation. When some DM annotations are found, the plugin will add the corresponding DM component descriptors under META-INF/ directory. It will also set the "DependencyManager-Component" manifest header (which references the descriptor paths).- Specified by:
analyzeJarin interfaceaQute.bnd.service.AnalyzerPlugin- Parameters:
analyzer- the object that is used to retrieve classes containing DM annotations.- Returns:
- true if the classpath has been modified so that the bundle classpath must be reanalyzed
- Throws:
Exception- on any errors.
-