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 reflection.
|
static String |
generateJava_SE_SystemPackageVersionString(String systemJavaVersion)
Attempt to generate an OSGi compatible Java SE system package version String from the System "java.version" property,
with the form (where x or xx is the major version number): 0.0.0.JavaSE_001_00x for Java 8 and earlier (e.g.
|
static String |
generateJavaVersionForSystemPackages(String systemJavaVersion)
Attempt to generate an OSGi compatible Java version String from the System "java.version" property,
with the form (where x is the major version number): 1.x for Java 8 and earlier, x.y for Java 9+.
|
static Object |
getBean(Object beanFactory,
String beanId)
Calls getBean() on the passed object using reflection.
|
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 beanpublic static String generateJavaVersionForSystemPackages(String systemJavaVersion)
systemJavaVersion
- a Java version string from System.getProperty("java.version") or equivalent.public static String generateJava_SE_SystemPackageVersionString(String systemJavaVersion)
systemJavaVersion
- a Java version string from System.getProperty("java.version") or equivalent.Copyright © 2000–2024 Apache Software Foundation. All rights reserved.