public class URLClassLoaderHandler extends Object implements ClassLoaderHandler
Constructor and Description |
---|
URLClassLoaderHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
handle(ClassLoader classloader,
ClasspathFinder classpathFinder,
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).
|
public boolean handle(ClassLoader classloader, ClasspathFinder classpathFinder, LogNode log)
ClassLoaderHandler
handle
in interface ClassLoaderHandler
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
FastClasspathScanner project), you should iterate through the ClassLoader's superclass lineage to
ensure subclasses of the target ClassLoader are correctly detected.classpathFinder
- The ClasspathFinder to register any discovered classpath elements with.log
- A logger instance -- write debug information using log.log("message"), then switch on verbose mode
to view it.Copyright © 2016. All rights reserved.