diff --git a/scr/src/main/java/org/apache/felix/scr/impl/helper/BindMethod.java b/scr/src/main/java/org/apache/felix/scr/impl/helper/BindMethod.java
index e00c551..24420c2 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/helper/BindMethod.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/helper/BindMethod.java
@@ -24,6 +24,7 @@
 
 import org.apache.felix.scr.impl.Activator;
 import org.apache.felix.scr.impl.manager.AbstractComponentManager;
+import org.apache.felix.scr.impl.manager.RefPair;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.log.LogService;
@@ -553,7 +554,7 @@
         return null;
     }
 
-    public AbstractComponentManager.RefPair getServiceObject( ServiceReference ref, BundleContext context )
+    public RefPair getServiceObject( ServiceReference ref, BundleContext context )
     {
         //??? this resolves which we need.... better way?
         if ( methodExists() )
@@ -568,15 +569,15 @@
                     return null;
                 }
 
-                return new AbstractComponentManager.RefPair(ref, service);
+                return new RefPair(ref, service);
             }
         }
-        return new AbstractComponentManager.RefPair(ref, null);
+        return new RefPair(ref, null);
     }
 
     protected Object[] getParameters( Method method, Object rawParameter )
     {
-        AbstractComponentManager.RefPair refPair = ( AbstractComponentManager.RefPair ) rawParameter;
+        RefPair refPair = ( RefPair ) rawParameter;
         if (m_paramStyle == SERVICE_REFERENCE )
         {
             return new Object[] {refPair.getRef()};
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java b/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java
index 6503561..72615f0 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java
@@ -909,33 +909,6 @@
 
     abstract void invokeUnbindMethod( DependencyManager dependencyManager, ServiceReference oldRef );
 
-    public static class RefPair
-    {
-        private final ServiceReference ref;
-        private Object serviceObject;
-
-        public RefPair( ServiceReference ref, Object serviceObject )
-        {
-            this.ref = ref;
-            this.serviceObject = serviceObject;
-        }
-
-        public ServiceReference getRef()
-        {
-            return ref;
-        }
-
-        public Object getServiceObject()
-        {
-            return serviceObject;
-        }
-
-        public void setServiceObject( Object serviceObject )
-        {
-            this.serviceObject = serviceObject;
-        }
-    }
-
     Map getDependencyMap()
     {
         return ( Map ) m_dependencies_map.get();
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 55301f4..964c78b 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
@@ -810,14 +810,14 @@
      *      if the service is bound or <code>null</code> if the service is not
      *      bound.
      */
-    private AbstractComponentManager.RefPair getBoundService( ServiceReference serviceReference )
+    private RefPair getBoundService( ServiceReference serviceReference )
     {
         Map dependencyMap = m_componentManager.getDependencyMap();
         if (dependencyMap == null)
         {
             return null;
         }
-        return ( AbstractComponentManager.RefPair ) (( Map ) dependencyMap.get( this )).get(serviceReference);
+        return ( RefPair ) (( Map ) dependencyMap.get( this )).get(serviceReference);
     }
 
 
@@ -835,7 +835,7 @@
     Object getService( ServiceReference serviceReference )
     {
         // check whether we already have the service and return that one
-        AbstractComponentManager.RefPair refPair = getBoundService( serviceReference );
+        RefPair refPair = getBoundService( serviceReference );
         if ( refPair != null && refPair.getServiceObject() != null )
         {
             return refPair.getServiceObject();
@@ -866,7 +866,7 @@
             }
             else
             {
-                refPair = new AbstractComponentManager.RefPair( serviceReference,  serviceObject );
+                refPair = new RefPair( serviceReference,  serviceObject );
                 ((Map)m_componentManager.getDependencyMap().get( this )).put( serviceReference, refPair );
             }
         }
@@ -886,7 +886,7 @@
         Map dependencyMap = m_componentManager.getDependencyMap();
         if ( dependencyMap != null )
         {
-            AbstractComponentManager.RefPair refPair  = ( AbstractComponentManager.RefPair ) ((Map ) dependencyMap.get( this )).get( serviceReference );
+            RefPair refPair  = ( RefPair ) ((Map ) dependencyMap.get( this )).get( serviceReference );
             if ( refPair != null && refPair.getServiceObject() != null )
             {
                 BundleComponentActivator activator = m_componentManager.getActivator();
@@ -1004,7 +1004,7 @@
             {
                 for ( int index = 0; index < refs.length; index++ )
                 {
-                    AbstractComponentManager.RefPair refPair = m_bindMethods.getBind().getServiceObject( refs[index], m_componentManager.getActivator().getBundleContext() );
+                    RefPair refPair = m_bindMethods.getBind().getServiceObject( refs[index], m_componentManager.getActivator().getBundleContext() );
                     // success is if we have the minimal required number of services bound
                     if ( refPair != null )
                     {
@@ -1021,7 +1021,7 @@
             ServiceReference ref = getFrameworkServiceReference();
             if ( ref != null )
             {
-                AbstractComponentManager.RefPair refPair = m_bindMethods.getBind().getServiceObject( ref, m_componentManager.getActivator().getBundleContext() );
+                RefPair refPair = m_bindMethods.getBind().getServiceObject( ref, m_componentManager.getActivator().getBundleContext() );
                 // success is if we have the minimal required number of services bound
                 if ( refPair != null )
                 {
@@ -1077,7 +1077,7 @@
         for ( Iterator i = parameters.entrySet().iterator(); i.hasNext(); )
         {
             Map.Entry entry = ( Map.Entry ) i.next();
-            if ( invokeBindMethod( componentInstance, ( AbstractComponentManager.RefPair ) entry.getValue() ) )
+            if ( invokeBindMethod( componentInstance, ( RefPair ) entry.getValue() ) )
             {
                 success = true;
             }
@@ -1158,7 +1158,7 @@
                 }
                 Map deps = ( Map ) dependencyMap.get( this );
                 BundleContext bundleContext = m_componentManager.getActivator().getBundleContext();
-                AbstractComponentManager.RefPair refPair = m_bindMethods.getBind().getServiceObject( ref, bundleContext );
+                RefPair refPair = m_bindMethods.getBind().getServiceObject( ref, bundleContext );
                 if ( refPair == null )
                 {
                     //reference deactivated while we are processing.
@@ -1196,7 +1196,7 @@
      *      be handed over to the bind method but the service cannot be
      *      retrieved using the service reference.
      */
-    private boolean invokeBindMethod( Object componentInstance, AbstractComponentManager.RefPair refPair )
+    private boolean invokeBindMethod( Object componentInstance, RefPair refPair )
     {
         // The bind method is only invoked if the implementation object is not
         // null. This is valid for both immediate and delayed components
@@ -1243,7 +1243,7 @@
         // null. This is valid for both immediate and delayed components
         if ( componentInstance != null )
         {
-            AbstractComponentManager.RefPair refPair = ( AbstractComponentManager.RefPair ) ((Map )m_componentManager.getDependencyMap().get( this )).get( ref );
+            RefPair refPair = ( RefPair ) ((Map )m_componentManager.getDependencyMap().get( this )).get( ref );
             MethodResult methodResult = m_bindMethods.getUpdated().invoke( componentInstance, refPair, MethodResult.VOID );
             if ( methodResult != null)
             {
@@ -1277,7 +1277,7 @@
         // null. This is valid for both immediate and delayed components
         if ( componentInstance != null )
         {
-            AbstractComponentManager.RefPair refPair = ( AbstractComponentManager.RefPair ) ((Map )m_componentManager.getDependencyMap().get( this )).get( ref );
+            RefPair refPair = ( RefPair ) ((Map )m_componentManager.getDependencyMap().get( this )).get( ref );
             MethodResult methodResult = m_bindMethods.getUnbind().invoke( componentInstance, refPair, MethodResult.VOID );
             if ( methodResult != null )
             {
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/manager/RefPair.java b/scr/src/main/java/org/apache/felix/scr/impl/manager/RefPair.java
new file mode 100644
index 0000000..cdd7d13
--- /dev/null
+++ b/scr/src/main/java/org/apache/felix/scr/impl/manager/RefPair.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.felix.scr.impl.manager;
+
+import org.osgi.framework.ServiceReference;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class RefPair
+{
+    private final ServiceReference ref;
+    private Object serviceObject;
+
+    public RefPair( ServiceReference ref, Object serviceObject )
+    {
+        this.ref = ref;
+        this.serviceObject = serviceObject;
+    }
+
+    public ServiceReference getRef()
+    {
+        return ref;
+    }
+
+    public Object getServiceObject()
+    {
+        return serviceObject;
+    }
+
+    public void setServiceObject( Object serviceObject )
+    {
+        this.serviceObject = serviceObject;
+    }
+}
diff --git a/scr/src/test/java/org/apache/felix/scr/impl/helper/BindMethodTest.java b/scr/src/test/java/org/apache/felix/scr/impl/helper/BindMethodTest.java
index 3b05736..b06bc3a 100644
--- a/scr/src/test/java/org/apache/felix/scr/impl/helper/BindMethodTest.java
+++ b/scr/src/test/java/org/apache/felix/scr/impl/helper/BindMethodTest.java
@@ -23,6 +23,7 @@
 
 import org.apache.felix.scr.impl.manager.AbstractComponentManager;
 import org.apache.felix.scr.impl.manager.ImmediateComponentManager;
+import org.apache.felix.scr.impl.manager.RefPair;
 import org.apache.felix.scr.impl.manager.components.FakeService;
 import org.apache.felix.scr.impl.manager.components.T1;
 import org.apache.felix.scr.impl.manager.components.T1a;
@@ -435,7 +436,7 @@
         ImmediateComponentManager icm = new ImmediateComponentManager( null, null, metadata, new ComponentMethods() );
         BindMethod bm = new BindMethod( icm, methodName, component.getClass(),
                 FakeService.class.getName(), isDS11, false );
-        AbstractComponentManager.RefPair refPair = bm.getServiceObject( m_serviceReference, m_context );
+        RefPair refPair = bm.getServiceObject( m_serviceReference, m_context );
         bm.invoke( component, refPair, null );
         assertEquals( expectCallPerformed, component.callPerformed );
     }
