Class EquinoxClassLoaderHandler
java.lang.Object
nonapi.io.github.classgraph.classloaderhandler.EquinoxClassLoaderHandler
- All Implemented Interfaces:
ClassLoaderHandler
Extract classpath entries from the Eclipse Equinox ClassLoader.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static boolean
True if system bundles have been read.private static final String[]
Field names. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
addBundleFile
(Object bundlefile, Set<Object> path, ClassLoader classLoader, ClasspathOrder classpathOrderOut, ScanSpec scanSpec, LogNode log) Add the bundle file.private static void
addClasspathEntries
(Object owner, ClassLoader classLoader, ClasspathOrder classpathOrderOut, ScanSpec scanSpec, LogNode log) Adds the classpath entries.static boolean
Check whether thisClassLoaderHandler
can handle a givenClassLoader
.static void
findClassLoaderOrder
(ClassLoader classLoader, ClassLoaderOrder classLoaderOrder, LogNode log) Find theClassLoader
delegation order for aClassLoader
.static void
findClasspathOrder
(ClassLoader classLoader, ClasspathOrder classpathOrder, ScanSpec scanSpec, LogNode log) Find the classpath entries for the associatedClassLoader
.
-
Field Details
-
alreadyReadSystemBundles
private static boolean alreadyReadSystemBundlesTrue if system bundles have been read. We assume there is only one system bundle on the classpath, so this is static. -
FIELD_NAMES
Field names.
-
-
Constructor Details
-
EquinoxClassLoaderHandler
private EquinoxClassLoaderHandler()Class cannot be constructed.
-
-
Method Details
-
canHandle
Check whether thisClassLoaderHandler
can handle a givenClassLoader
.- Parameters:
classLoaderClass
- theClassLoader
class or one of its superclasses.log
- the log- Returns:
- true if this
ClassLoaderHandler
can handle theClassLoader
.
-
findClassLoaderOrder
public static void findClassLoaderOrder(ClassLoader classLoader, ClassLoaderOrder classLoaderOrder, LogNode log) Find theClassLoader
delegation order for aClassLoader
.- Parameters:
classLoader
- theClassLoader
to find the order for.classLoaderOrder
- aClassLoaderOrder
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 filepath
- the pathclassLoader
- the classloaderclasspathOrderOut
- the classpath orderscanSpec
- the scan speclog
- the log
-
addClasspathEntries
private static void addClasspathEntries(Object owner, ClassLoader classLoader, ClasspathOrder classpathOrderOut, ScanSpec scanSpec, LogNode log) Adds the classpath entries.- Parameters:
owner
- the ownerclassLoader
- the class loaderclasspathOrderOut
- the classpath order outscanSpec
- the scan speclog
- the log
-
findClasspathOrder
public static void findClasspathOrder(ClassLoader classLoader, ClasspathOrder classpathOrder, ScanSpec scanSpec, LogNode log) Find the classpath entries for the associatedClassLoader
.- Parameters:
classLoader
- theClassLoader
to find the classpath entries order for.classpathOrder
- aClasspathOrder
object to update.scanSpec
- theScanSpec
.log
- the log.
-