felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r918681 - in /felix/trunk/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime: DescriptorEntry.java DescriptorParser.java
Date Wed, 03 Mar 2010 20:58:35 GMT
Author: pderop
Date: Wed Mar  3 20:58:35 2010
New Revision: 918681

URL: http://svn.apache.org/viewvc?rev=918681&view=rev
Log:
added annotation support for BundleAdapterService

Modified:
    felix/trunk/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/DescriptorEntry.java
    felix/trunk/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/DescriptorParser.java

Modified: felix/trunk/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/DescriptorEntry.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/DescriptorEntry.java?rev=918681&r1=918680&r2=918681&view=diff
==============================================================================
--- felix/trunk/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/DescriptorEntry.java
(original)
+++ felix/trunk/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/DescriptorEntry.java
Wed Mar  3 20:58:35 2010
@@ -27,6 +27,7 @@
     Service,
     AspectService,
     AdapterService,
+    BundleAdapterService,
     ServiceDependency,
     TemporalServiceDependency,
     ConfigurationDependency,

Modified: felix/trunk/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/DescriptorParser.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/DescriptorParser.java?rev=918681&r1=918680&r2=918681&view=diff
==============================================================================
--- felix/trunk/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/DescriptorParser.java
(original)
+++ felix/trunk/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/DescriptorParser.java
Wed Mar  3 20:58:35 2010
@@ -207,6 +207,34 @@
      * @param def
      * @return
      */
+    public int getInt(DescriptorParam param)
+    {
+        String value = getString(param, null);
+        if (value != null)
+        {
+            try
+            {
+                return Integer.parseInt(value);
+            }
+            catch (NumberFormatException e)
+            {
+                throw new IllegalArgumentException("parameter " + param + " is not an int
value: "
+                    + value);
+            }
+        }
+        else
+        {
+            throw new IllegalArgumentException("missing " + param + " parameter from annotation");
+        }
+    }
+
+    /**
+     * Once a component descriptor entry line is parsed, you can retrieve entry attributes
using this method.
+     *
+     * @param param
+     * @param def
+     * @return
+     */
     public int getInt(DescriptorParam param, int def)
     {
         String value = getString(param, null);



Mime
View raw message