org.apache.felix.dm.annotation.plugin.bnd
Class AnnotationPlugin

java.lang.Object
  extended by org.apache.felix.dm.annotation.plugin.bnd.AnnotationPlugin
All Implemented Interfaces:
aQute.bnd.service.AnalyzerPlugin

public class AnnotationPlugin
extends Object
implements aQute.bnd.service.AnalyzerPlugin

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.


Constructor Summary
AnnotationPlugin()
           
 
Method Summary
 boolean analyzeJar(aQute.lib.osgi.Analyzer analyzer)
          This plugin is called after analysis of the JAR but before manifest generation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationPlugin

public AnnotationPlugin()
Method Detail

analyzeJar

public boolean analyzeJar(aQute.lib.osgi.Analyzer analyzer)
                   throws Exception
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 OSGI-INF/ directory. It will also set the "DependencyManager-Component" manifest header (which references the descriptor paths).

Specified by:
analyzeJar in interface aQute.bnd.service.AnalyzerPlugin
Parameters:
analyzer - the object that is used to retrieve classes containing DM annotations.
Returns:
true if the classpace has been modified so that the bundle classpath must be reanalyzed
Throws:
Exception - on any errors.


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.