Author: pderop
Date: Sun May 23 20:07:39 2010
New Revision: 947478

URL: http://svn.apache.org/viewvc?rev=947478&view=rev
Log:
added field attribute in Aspect annotation

Modified:
    
felix/trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/AspectService.java
    
felix/trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/AnnotationCollector.java
    
felix/trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/EntryParam.java

Modified: 
felix/trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/AspectService.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/AspectService.java?rev=947478&r1=947477&r2=947478&view=diff
==============================================================================
--- 
felix/trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/AspectService.java
 (original)
+++ 
felix/trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/AspectService.java
 Sun May 23 20:07:39 2010
@@ -62,4 +62,10 @@ public @interface AspectService
      * @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 "";
 }

Modified: 
felix/trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/AnnotationCollector.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/AnnotationCollector.java?rev=947478&r1=947477&r2=947478&view=diff
==============================================================================
--- 
felix/trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/AnnotationCollector.java
 (original)
+++ 
felix/trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/AnnotationCollector.java
 Sun May 23 20:07:39 2010
@@ -381,9 +381,6 @@ public class AnnotationCollector extends
             // removed callback
             writer.putString(annotation, EntryParam.removed, null);
         }
-        
-        // id attribute
-        writer.putString(annotation, EntryParam.name, null);
     }
 
     /**
@@ -435,6 +432,9 @@ public class AnnotationCollector extends
 
         // 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());

Modified: 
felix/trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/EntryParam.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/EntryParam.java?rev=947478&r1=947477&r2=947478&view=diff
==============================================================================
--- 
felix/trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/EntryParam.java
 (original)
+++ 
felix/trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/EntryParam.java
 Sun May 23 20:07:39 2010
@@ -34,5 +34,5 @@ public enum EntryParam
     ranking,
     factory,
     factoryConfigure,
-    name
+    field
 }


Reply via email to