Class WeblogicClassLoaderHandler
- java.lang.Object
-
- nonapi.io.github.classgraph.classloaderhandler.WeblogicClassLoaderHandler
-
- All Implemented Interfaces:
ClassLoaderHandler
public class WeblogicClassLoaderHandler extends java.lang.Object implements ClassLoaderHandler
Extract classpath entries from the Weblogic ClassLoaders.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface nonapi.io.github.classgraph.classloaderhandler.ClassLoaderHandler
ClassLoaderHandler.DelegationOrder
-
-
Constructor Summary
Constructors Constructor Description WeblogicClassLoaderHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassLoaderHandler.DelegationOrder
getDelegationOrder(java.lang.ClassLoader classLoaderInstance)
The delegation order configuration for a given ClassLoader instance (this is usually PARENT_FIRST for most ClassLoaders, since you don't generally want to be able to override system classes with user classes, but this can be overridden by some ClassLoaders, e.g.java.lang.ClassLoader
getEmbeddedClassLoader(java.lang.ClassLoader outerClassLoaderInstance)
If this ClassLoader delegates directly to an embedded classloader instance, return it here, otherwise return null.void
handle(ScanSpec scanSpec, java.lang.ClassLoader classLoader, ClasspathOrder classpathOrderOut, LogNode log)
Determine if a given ClassLoader can be handled (meaning that its classpath elements can be extracted from it), and if it can, extract the classpath elements from the ClassLoader and register them with the ClasspathFinder using classpathFinder.addClasspathElement(pathElement) or classpathFinder.addClasspathElements(path).java.lang.String[]
handledClassLoaders()
The fully-qualified names of handled classloader classes.
-
-
-
Method Detail
-
handledClassLoaders
public java.lang.String[] handledClassLoaders()
Description copied from interface:ClassLoaderHandler
The fully-qualified names of handled classloader classes.- Specified by:
handledClassLoaders
in interfaceClassLoaderHandler
- Returns:
- The names of ClassLoaders that this ClassLoaderHandler can handle.
-
getEmbeddedClassLoader
public java.lang.ClassLoader getEmbeddedClassLoader(java.lang.ClassLoader outerClassLoaderInstance)
Description copied from interface:ClassLoaderHandler
If this ClassLoader delegates directly to an embedded classloader instance, return it here, otherwise return null.- Specified by:
getEmbeddedClassLoader
in interfaceClassLoaderHandler
- Parameters:
outerClassLoaderInstance
- The outer ClassLoader instance to check for an embedded ClassLoader.- Returns:
- The embedded ClassLoader to use instead of the outer ClassLoader, or null to use the outer ClassLoader.
-
getDelegationOrder
public ClassLoaderHandler.DelegationOrder getDelegationOrder(java.lang.ClassLoader classLoaderInstance)
Description copied from interface:ClassLoaderHandler
The delegation order configuration for a given ClassLoader instance (this is usually PARENT_FIRST for most ClassLoaders, since you don't generally want to be able to override system classes with user classes, but this can be overridden by some ClassLoaders, e.g. WebSphere).- Specified by:
getDelegationOrder
in interfaceClassLoaderHandler
- Parameters:
classLoaderInstance
- The ClassLoader to get the delegation order for.- Returns:
- The delegation order for the given ClassLoader.
-
handle
public void handle(ScanSpec scanSpec, java.lang.ClassLoader classLoader, ClasspathOrder classpathOrderOut, LogNode log)
Description copied from interface:ClassLoaderHandler
Determine if a given ClassLoader can be handled (meaning that its classpath elements can be extracted from it), and if it can, extract the classpath elements from the ClassLoader and register them with the ClasspathFinder using classpathFinder.addClasspathElement(pathElement) or classpathFinder.addClasspathElements(path).- Specified by:
handle
in interfaceClassLoaderHandler
- Parameters:
scanSpec
- the scanning specification, in case it is needed, e.g. this could be used to reduce the number of classpath elements returned in cases where it is very costly for a given classloader to return the entire classpath. (The ScanSpec can be safely ignored, however, and the returned paths will be filtered by ClassGraph.)classLoader
- The ClassLoader class to attempt to handle. If you can't directly use instanceof (because you are using introspection so that your ClassLoaderHandler implementation can be added to the upstream ClassGraph project), you should iterate through the ClassLoader's superclass lineage to ensure subclasses of the target ClassLoader are correctly detected.classpathOrderOut
- The ClasspathOrder to register any discovered classpath elements with.log
- A logger instance -- if this is non-null, write debug information using log.log("message").
-
-