Class OSGiBundleClassLoaderHelper

java.lang.Object
org.jruby.embed.osgi.utils.OSGiBundleClassLoaderHelper

public class OSGiBundleClassLoaderHelper extends Object
Various introspection tricks to access the file system from OSGi. Tested for felix and equinox.
  • Field Details

    • identifiedOsgiImpl

      private static boolean identifiedOsgiImpl
    • isEquinox

      private static boolean isEquinox
    • isFelix

      private static boolean isFelix
    • Equinox_BundleHost_getBundleLoader_method

      private static Method Equinox_BundleHost_getBundleLoader_method
    • Equinox_BundleLoader_createClassLoader_method

      private static Method Equinox_BundleLoader_createClassLoader_method
    • Felix_BundleImpl_m_modules_field

      private static Field Felix_BundleImpl_m_modules_field
    • Felix_ModuleImpl_m_classLoader_field

      private static Field Felix_ModuleImpl_m_classLoader_field
  • Constructor Details

    • OSGiBundleClassLoaderHelper

      public OSGiBundleClassLoaderHelper()
  • Method Details

    • init

      private static void init(org.osgi.framework.Bundle bundle)
    • getBundleClassLoader

      public static ClassLoader getBundleClassLoader(org.osgi.framework.Bundle bundle)
      Assuming the bundle is started.
      Parameters:
      bundle -
      Returns:
      classloader object
    • internalGetEquinoxBundleClassLoader

      private static ClassLoader internalGetEquinoxBundleClassLoader(org.osgi.framework.Bundle bundle)
    • internalGetFelixBundleClassLoader

      private static ClassLoader internalGetFelixBundleClassLoader(org.osgi.framework.Bundle bundle)