Class EquinoxClassLoaderHandler

java.lang.Object
nonapi.io.github.classgraph.classloaderhandler.EquinoxClassLoaderHandler
All Implemented Interfaces:
ClassLoaderHandler

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

    • 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 String[] FIELD_NAMES
      Field names.
  • Constructor Details

    • EquinoxClassLoaderHandler

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

    • canHandle

      public static boolean canHandle(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(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(Object bundlefile, Set<Object> path, 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(Object owner, 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(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.