Fixed bug when parsing aspect service annotation. Added a factoryMethod attribute in order to allow the creation of the service implementation from a static method. Renamed factory attribute into factorySet

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@957375 13f79535-47bb-0310-9956-ffa450edef68
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 6900360..324fb92 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
@@ -274,11 +274,14 @@
         // provide attribute
         writer.putClassArray(annotation, EntryParam.provide, m_interfaces);
 
-        // factory attribute
-        writer.putString(annotation, EntryParam.factory, null);
+        // factorySet attribute
+        writer.putString(annotation, EntryParam.factorySet, null);
 
-        // factoryPropertiesCallback attribute
+        // factoryConfigure attribute
         writer.putString(annotation, EntryParam.factoryConfigure, null);
+        
+        // factoryMethod attribute
+        writer.putString(annotation, EntryParam.factoryMethod, null);
     }
 
     private void addCommonServiceParams(EntryWriter writer)
@@ -457,8 +460,11 @@
         }
         else
         {
-            writer.putClassArray(annotation, EntryParam.service, null);
+            writer.putClass(annotation, EntryParam.service, null);
         }
+        
+        // Parse factoryMethod attribute
+        writer.putString(annotation, EntryParam.factoryMethod, null);
     }
 
     /**
@@ -492,6 +498,9 @@
 
         // Parse the optional adapter service (use directly implemented interface by default).
         writer.putClassArray(annotation, EntryParam.adapterService, m_interfaces);
+        
+        // Parse factoryMethod attribute
+        writer.putString(annotation, EntryParam.factoryMethod, null);
     }
 
     /**
@@ -529,6 +538,9 @@
 
         // Parse propagate attribute
         writer.putString(annotation, EntryParam.propagate, Boolean.FALSE.toString());
+        
+        // Parse factoryMethod attribute
+        writer.putString(annotation, EntryParam.factoryMethod, null);
     }
 
     /**
@@ -597,6 +609,9 @@
         // Parse optional meta types for configuration description.
         String factoryPid = get(annotation, EntryParam.factoryPid.toString(), m_className);
         parseMetaTypes(annotation, factoryPid, true);
+        
+        // Parse factoryMethod attribute
+        writer.putString(annotation, EntryParam.factoryMethod, null);
     }
 
     private void parseBundleDependencyAnnotation(Annotation annotation)
@@ -636,6 +651,7 @@
         writer.putString(annotation, EntryParam.removed, null);
         writer.putString(annotation, EntryParam.required, null);
         writer.putString(annotation, EntryParam.propagate, null);
+        writer.putString(annotation, EntryParam.factoryMethod, null);
     }
 
     /**