public class OsgiUtil extends Object
Constructor and Description |
---|
OsgiUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
containsBean(Object beanFactory,
String beanId)
Calls containsBean on the passed object using refelection.
|
static Object |
getBean(Object beanFactory,
String beanId)
Calls getBean() on the passed object using refelection.
|
static URL |
translateBundleURLToJarURL(URL bundleUrl,
org.osgi.framework.Bundle bundle)
A bundle is a jar, and a bundle URL will be useless to clients, this method translates
a URL to a resource inside a bundle from "bundle:something/path" to "jar:file:bundlelocation!/path"
|
public static URL translateBundleURLToJarURL(URL bundleUrl, org.osgi.framework.Bundle bundle) throws MalformedURLException
bundleUrl
- URL to translatebundle
- the bundleMalformedURLException
- if url is malformedpublic static Object getBean(Object beanFactory, String beanId)
beanFactory
- bean factorybeanId
- id of beanpublic static boolean containsBean(Object beanFactory, String beanId)
beanFactory
- bean factorybeanId
- id of beanCopyright © 2000–2020 Apache Software Foundation. All rights reserved.