improved javadoc
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@984732 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/ServiceDependency.java b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/ServiceDependency.java
index 0ad12f1..4f51357 100644
--- a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/ServiceDependency.java
+++ b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/ServiceDependency.java
@@ -118,34 +118,48 @@
*
* <blockquote><pre>
* /**
- * * A Service whose service dependency filter/require attribute may be configured from ConfigAdmin
+ * * A Service whose service dependency "otherService" filter is configured from ConfigAdmin
* */
* @Service
* class X {
* private Dictionary m_config;
*
+ * /**
+ * * Initialize our service from config ... and store the config for later usage (from our init method)
+ * */
* @ConfigurationDependency(pid="MyPid")
* void configure(Dictionary conf) {
- * // Initialize our service from config ...
- *
- * // And store the config for later usage (from our init method)
* m_config = config;
* }
*
- * // This named dependency will be configured by our init method (see below).
- * @ServiceDependency(name="dependency1")
- * void bindOtherService(OtherService other) {
- * // the filter and required flag will be configured from our init method.
- * }
-
- * // The returned Map will be used to configure our "dependency1" Dependency.
+ * /**
+ * * All unnamed dependencies are injected: we can now configure other named
+ * * dependencies, using the already injected configuration.
+ * * The returned Map will be used to configure our "otherService" Dependency.
+ * */
* @Init
* Map init() {
* return new HashMap() {{
- * put("dependency1.filter", m_config.get("filter"));
- * put("dependency1.required", m_config.get("required"));
+ * put("otherService.filter", m_config.get("filter"));
+ * put("otherService.required", m_config.get("required"));
* }};
* }
+ *
+ * /**
+ * * This named dependency filter/required flag will be configured by our init method (see above).
+ * */
+ * @ServiceDependency(name="otherService")
+ * void bindOtherService(OtherService other) {
+ * }
+ *
+ * /**
+ * * All dependencies are injected and our service is now ready to be published.
+ * * Notice that you can also use the publisher service attribute if you need
+ * * to take control on service exposition.
+ * */
+ * @Start
+ * void start() {
+ * }
* }
* </pre></blockquote>
*/