@HashCodeAndEqualsPlugin.Enhance public static class ClassFileLocator.ForUrl extends Object implements ClassFileLocator
URLClassLoader.
Doing so, boot loader resources might be located additionally to those found via the specified URLs.| Modifier and Type | Class and Description |
|---|---|
protected static class |
ClassFileLocator.ForUrl.ClassLoaderCreationAction
An action to create a class loader with the purpose of locating classes from an URL location.
|
ClassFileLocator.Compound, ClassFileLocator.Filtering, ClassFileLocator.ForClassLoader, ClassFileLocator.ForFolder, ClassFileLocator.ForInstrumentation, ClassFileLocator.ForJarFile, ClassFileLocator.ForModule, ClassFileLocator.ForModuleFile, ClassFileLocator.ForUrl, ClassFileLocator.NoOp, ClassFileLocator.PackageDiscriminating, ClassFileLocator.Resolution, ClassFileLocator.SimpleCLASS_FILE_EXTENSION| Constructor and Description |
|---|
ForUrl(Collection<? extends URL> urls)
Creates a new class file locator for the given URLs.
|
ForUrl(URL... url)
Creates a new class file locator for the given URLs.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
ClassFileLocator.Resolution |
locate(String name)
Locates the class file for a given type and returns the binary data of the class file.
|
public ForUrl(URL... url)
url - The URLs to search for class files.public ForUrl(Collection<? extends URL> urls)
urls - The URLs to search for class files.public ClassFileLocator.Resolution locate(String name) throws IOException
locate in interface ClassFileLocatorname - The name of the type to locate a class file representation for.IOException - If reading a class file causes an error.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2014–2023. All rights reserved.