blob: a59237704b3ba4b6f76ee741a91aa90259b1c480 [file] [log] [blame]
Stuart McCulloch26e7a5a2011-10-17 10:31:43 +00001package aQute.bnd.component;
2
3import aQute.bnd.service.*;
4import aQute.lib.osgi.*;
5
6/**
7 * Analyze the class space for any classes that have an OSGi annotation for DS.
8 *
9 */
10public class DSAnnotations implements AnalyzerPlugin {
11
12 public boolean analyzeJar(Analyzer analyzer) throws Exception {
13
14 for (Clazz c : analyzer.getClassspace().values()) {
15 ComponentDef definition = AnnotationReader.getDefinition(c, analyzer);
16 if (definition != null) {
17 definition.prepare(analyzer);
18 analyzer.getJar().putResource("OSGI-INF/" + definition.name + ".xml",
19 new TagResource(definition.getTag()));
20 }
21 }
22 return false;
23 }
24
25}