FELIX-3677 info command shows all bound references

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1390589 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/src/main/java/org/apache/felix/scr/Reference.java b/scr/src/main/java/org/apache/felix/scr/Reference.java
index e5518bf..eb285c5 100644
--- a/scr/src/main/java/org/apache/felix/scr/Reference.java
+++ b/scr/src/main/java/org/apache/felix/scr/Reference.java
@@ -138,4 +138,5 @@
      */
     String getUpdatedMethodName();
 
+    ServiceReference[] getBoundServiceReferences();
 }
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/ScrCommand.java b/scr/src/main/java/org/apache/felix/scr/impl/ScrCommand.java
index 03acf07..b81c537 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/ScrCommand.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/ScrCommand.java
@@ -34,6 +34,7 @@
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceReference;
 
 /**
  * The <code>ScrCommand</code> class provides the implementations for the
@@ -282,6 +283,14 @@
                     out.println(refs[i].isStatic() ? "static" : "dynamic");
                     out.print("    Policy option: ");
                     out.println(refs[i].isReluctant() ? "reluctant" : "greedy");
+                    ServiceReference[] serviceRefs = refs[i].getBoundServiceReferences();
+                    if (serviceRefs != null) {
+                        out.print("    Bound to:");
+                        for (int k = 0; k< serviceRefs.length; k++) {
+                            out.print("        " );
+                            out.println(serviceRefs[k]);
+                        }
+                    }
                 }
             }
 
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java b/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
index bf8a5b7..6e20719 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
@@ -767,7 +767,7 @@
      * services this instance is bound to or <code>null</code> if no services
      * are actually bound.
      */
-    private ServiceReference[] getBoundServiceReferences()
+    public ServiceReference[] getBoundServiceReferences()
     {
         Map dependencyMap = m_componentManager.getDependencyMap();
         if ( dependencyMap == null )