diff org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceReference.d @ 105:bbe49769ec18

...
author Frank Benoit <benoit@tionex.de>
date Sun, 08 Nov 2009 12:42:30 +0100
parents 12b890a6392a
children
line wrap: on
line diff
--- a/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceReference.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceReference.d	Sun Nov 08 12:42:30 2009 +0100
@@ -1,8 +1,8 @@
 /*
  * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/ServiceReference.java,v 1.20 2007/02/21 16:49:05 hargrave Exp $
- * 
+ *
  * Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -16,14 +16,17 @@
  * limitations under the License.
  */
 
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
 module org.osgi.framework.ServiceReference;
-import org.osgi.framework.Bundle;
 
 import java.lang.all;
 
+import org.osgi.framework.Bundle; // packageimport
+
 /**
  * A reference to a service.
- * 
+ *
  * <p>
  * The Framework returns <code>ServiceReference</code> objects from the
  * <code>BundleContext.getServiceReference</code> and
@@ -44,7 +47,7 @@
  * If the same service object is registered multiple times,
  * <code>ServiceReference</code> objects associated with different
  * <code>ServiceRegistration</code> objects are not equal.
- * 
+ *
  * @see BundleContext#getServiceReference
  * @see BundleContext#getServiceReferences
  * @see BundleContext#getService
@@ -57,16 +60,16 @@
      * Returns the property value to which the specified property key is mapped
      * in the properties <code>Dictionary</code> object of the service
      * referenced by this <code>ServiceReference</code> object.
-     * 
+     *
      * <p>
      * Property keys are case-insensitive.
-     * 
+     *
      * <p>
      * This method must continue to return property values after the service has
      * been unregistered. This is so references to unregistered services (for
      * example, <code>ServiceReference</code> objects stored in the log) can
      * still be interrogated.
-     * 
+     *
      * @param key The property key.
      * @return The property value to which the key is mapped; <code>null</code>
      *         if there is no property named after the key.
@@ -77,20 +80,20 @@
      * Returns an array of the keys in the properties <code>Dictionary</code>
      * object of the service referenced by this <code>ServiceReference</code>
      * object.
-     * 
+     *
      * <p>
      * This method will continue to return the keys after the service has been
      * unregistered. This is so references to unregistered services (for
      * example, <code>ServiceReference</code> objects stored in the log) can
      * still be interrogated.
-     * 
+     *
      * <p>
      * This method is <i>case-preserving </i>; this means that every key in the
      * returned array must have the same case as the corresponding key in the
      * properties <code>Dictionary</code> that was passed to the
      * {@link BundleContext#registerService(String[],Object,java.util.Dictionary)}
      * or {@link ServiceRegistration#setProperties} methods.
-     * 
+     *
      * @return An array of property keys.
      */
     public String[] getPropertyKeys();
@@ -98,12 +101,12 @@
     /**
      * Returns the bundle that registered the service referenced by this
      * <code>ServiceReference</code> object.
-     * 
+     *
      * <p>
      * This method must return <code>null</code> when the service has been
      * unregistered. This can be used to determine if the service has been
      * unregistered.
-     * 
+     *
      * @return The bundle that registered the service referenced by this
      *         <code>ServiceReference</code> object; <code>null</code> if
      *         that service has already been unregistered.
@@ -115,12 +118,12 @@
      * Returns the bundles that are using the service referenced by this
      * <code>ServiceReference</code> object. Specifically, this method returns
      * the bundles whose usage count for that service is greater than zero.
-     * 
+     *
      * @return An array of bundles whose usage count for the service referenced
      *         by this <code>ServiceReference</code> object is greater than
      *         zero; <code>null</code> if no bundles are currently using that
      *         service.
-     * 
+     *
      * @since 1.1
      */
     public Bundle[] getUsingBundles();
@@ -142,14 +145,14 @@
      * package source of the specified bundle then return <code>true</code>;
      * otherwise return <code>false</code>.</li>
      * </ol>
-     * 
+     *
      * @param bundle The <code>Bundle</code> object to check.
      * @param className The class name to check.
      * @return <code>true</code> if the bundle which registered the service
      *         referenced by this <code>ServiceReference</code> and the
      *         specified bundle use the same source for the package of the
      *         specified class name. Otherwise <code>false</code> is returned.
-     * 
+     *
      * @since 1.3
      */
     public bool isAssignableTo(Bundle bundle, String className);
@@ -157,7 +160,7 @@
     /**
      * Compares this <code>ServiceReference</code> with the specified
      * <code>ServiceReference</code> for order.
-     * 
+     *
      * <p>
      * If this <code>ServiceReference</code> and the specified
      * <code>ServiceReference</code> have the same
@@ -172,7 +175,7 @@
      * <code>ServiceReference</code> if it has a higher
      * {@link Constants#SERVICE_ID service id} and greater if it has a lower
      * service id.
-     * 
+     *
      * @param reference The <code>ServiceReference</code> to be compared.
      * @return Returns a negative integer, zero, or a positive integer if this
      *         <code>ServiceReference</code> is less than, equal to, or