diff options
Diffstat (limited to 'bundles/org.eclipse.osgi/container')
-rw-r--r-- | bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java index 9910bb28f..f64ce9511 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2012 IBM Corporation and others. + * Copyright (c) 2003, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -982,6 +982,12 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object, return registration; } + public <S> ServiceRegistration<S> registerService(Class<S> clazz, ServiceFactory<S> factory, Dictionary<String, ?> properties) { + @SuppressWarnings("unchecked") + ServiceRegistration<S> registration = (ServiceRegistration<S>) registerService(clazz.getName(), factory, properties); + return registration; + } + public <S> ServiceReference<S> getServiceReference(Class<S> clazz) { @SuppressWarnings("unchecked") ServiceReference<S> reference = (ServiceReference<S>) getServiceReference(clazz.getName()); |