Class EquinoxClassLoaderHandler

  • All Implemented Interfaces:
    ClassLoaderHandler

    class EquinoxClassLoaderHandler
    extends java.lang.Object
    implements ClassLoaderHandler
    Extract classpath entries from the Eclipse Equinox ClassLoader.
    • Field Detail

      • alreadyReadSystemBundles

        private static boolean alreadyReadSystemBundles
        True if system bundles have been read. We assume there is only one system bundle on the classpath, so this is static.
      • FIELD_NAMES

        private static final java.lang.String[] FIELD_NAMES
        Field names.
    • Constructor Detail

      • EquinoxClassLoaderHandler

        private EquinoxClassLoaderHandler()
        Class cannot be constructed.
    • Method Detail

      • canHandle

        public static boolean canHandle​(java.lang.Class<?> classLoaderClass,
                                        LogNode log)
        Check whether this ClassLoaderHandler can handle a given ClassLoader.
        Parameters:
        classLoaderClass - the ClassLoader class or one of its superclasses.
        log - the log
        Returns:
        true if this ClassLoaderHandler can handle the ClassLoader.
      • findClassLoaderOrder

        public static void findClassLoaderOrder​(java.lang.ClassLoader classLoader,
                                                ClassLoaderOrder classLoaderOrder,
                                                LogNode log)
        Find the ClassLoader delegation order for a ClassLoader.
        Parameters:
        classLoader - the ClassLoader to find the order for.
        classLoaderOrder - a ClassLoaderOrder object to update.
        log - the log
      • addBundleFile

        private static void addBundleFile​(java.lang.Object bundlefile,
                                          java.util.Set<java.lang.Object> path,
                                          java.lang.ClassLoader classLoader,
                                          ClasspathOrder classpathOrderOut,
                                          ScanSpec scanSpec,
                                          LogNode log)
        Add the bundle file.
        Parameters:
        bundlefile - the bundle file
        path - the path
        classLoader - the classloader
        classpathOrderOut - the classpath order
        scanSpec - the scan spec
        log - the log
      • addClasspathEntries

        private static void addClasspathEntries​(java.lang.Object owner,
                                                java.lang.ClassLoader classLoader,
                                                ClasspathOrder classpathOrderOut,
                                                ScanSpec scanSpec,
                                                LogNode log)
        Adds the classpath entries.
        Parameters:
        owner - the owner
        classLoader - the class loader
        classpathOrderOut - the classpath order out
        scanSpec - the scan spec
        log - the log
      • findClasspathOrder

        public static void findClasspathOrder​(java.lang.ClassLoader classLoader,
                                              ClasspathOrder classpathOrder,
                                              ScanSpec scanSpec,
                                              LogNode log)
        Find the classpath entries for the associated ClassLoader.
        Parameters:
        classLoader - the ClassLoader to find the classpath entries order for.
        classpathOrder - a ClasspathOrder object to update.
        scanSpec - the ScanSpec.
        log - the log.