added field attribute in Aspect annotation

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@947478 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/AspectService.java b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/AspectService.java
index ff74749..41107a9 100644
--- a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/AspectService.java
+++ b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/AspectService.java
@@ -62,4 +62,10 @@
      * @return the ranking of this aspect
      */
     int ranking();
+    
+    /**
+     * Specifies the field name where to inject the original service. By default, the original service is injected
+     * in any attributes in the aspect implementation that are of the same type as the aspect interface.
+     */
+    String field() default "";
 }
diff --git a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/AnnotationCollector.java b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/AnnotationCollector.java
index a192057..83d3a48 100644
--- a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/AnnotationCollector.java
+++ b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/AnnotationCollector.java
@@ -381,9 +381,6 @@
             // removed callback
             writer.putString(annotation, EntryParam.removed, null);
         }
-        
-        // id attribute
-        writer.putString(annotation, EntryParam.name, null);
     }
 
     /**
@@ -435,6 +432,9 @@
 
         // Parse Aspect properties.
         parseProperties(annotation, EntryParam.properties, writer);
+        
+        // Parse aspect impl field where to inject the original service.
+        writer.putString(annotation, EntryParam.field, null);
 
         // Parse service interface this aspect is applying to
         Object service = annotation.get(EntryParam.service.toString());
diff --git a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/EntryParam.java b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/EntryParam.java
index 703effd..2c14eef 100644
--- a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/EntryParam.java
+++ b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/EntryParam.java
@@ -34,5 +34,5 @@
     ranking,
     factory,
     factoryConfigure,
-    name
+    field
 }