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 booleanTrue if system bundles have been read.private static final String[]Field names. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddBundleFile(Object bundlefile, Set<Object> path, ClassLoader classLoader, ClasspathOrder classpathOrderOut, ScanSpec scanSpec, LogNode log) Add the bundle file.private static voidaddClasspathEntries(Object owner, ClassLoader classLoader, ClasspathOrder classpathOrderOut, ScanSpec scanSpec, LogNode log) Adds the classpath entries.static booleanCheck whether thisClassLoaderHandlercan handle a givenClassLoader.static voidfindClassLoaderOrder(ClassLoader classLoader, ClassLoaderOrder classLoaderOrder, LogNode log) Find theClassLoaderdelegation order for aClassLoader.static voidfindClasspathOrder(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 thisClassLoaderHandlercan handle a givenClassLoader.- Parameters:
classLoaderClass- theClassLoaderclass or one of its superclasses.log- the log- Returns:
- true if this
ClassLoaderHandlercan handle theClassLoader.
-
findClassLoaderOrder
public static void findClassLoaderOrder(ClassLoader classLoader, ClassLoaderOrder classLoaderOrder, LogNode log) Find theClassLoaderdelegation order for aClassLoader.- Parameters:
classLoader- theClassLoaderto find the order for.classLoaderOrder- aClassLoaderOrderobject 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- theClassLoaderto find the classpath entries order for.classpathOrder- aClasspathOrderobject to update.scanSpec- theScanSpec.log- the log.
-