@HashCodeAndEqualsPlugin.Enhance public static class ClassFileLocator.ForFolder extends ClassFileLocator.MultiReleaseAware
<classname>.class
files
within their package folder.ClassFileLocator.Compound, ClassFileLocator.Filtering, ClassFileLocator.ForClassLoader, ClassFileLocator.ForFolder, ClassFileLocator.ForInstrumentation, ClassFileLocator.ForJarFile, ClassFileLocator.ForModule, ClassFileLocator.ForModuleFile, ClassFileLocator.ForUrl, ClassFileLocator.MultiReleaseAware, ClassFileLocator.NoOp, ClassFileLocator.PackageDiscriminating, ClassFileLocator.Resolution, ClassFileLocator.Simple
NO_MULTI_RELEASE
CLASS_FILE_EXTENSION, META_INF_VERSIONS
Modifier | Constructor and Description |
---|---|
|
ForFolder(File folder)
Creates a new class file locator for a folder structure of class files.
|
protected |
ForFolder(int[] version,
File folder)
Creates a new class file locator for a folder structure of class files.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected byte[] |
doLocate(String path)
Resolves a possible multi-release entry, if it exists.
|
static ClassFileLocator |
of(File folder,
ClassFileVersion classFileVersion)
Creates a new class file locator for a folder structure of class files.
|
locate
public ForFolder(File folder)
folder
- The base folder of the package structure.protected ForFolder(int[] version, File folder)
version
- Contains the existing multi-release jar folders that are available for the
current JVM version in decreasing order.folder
- The base folder of the package structure.public static ClassFileLocator of(File folder, ClassFileVersion classFileVersion) throws IOException
folder
- The base folder of the package structure.classFileVersion
- The class file version to consider for multi-release JAR files.IOException
- If an I/O exception occurs.@MaybeNull protected byte[] doLocate(String path) throws IOException
doLocate
in class ClassFileLocator.MultiReleaseAware
path
- The path of the class file.null
if it does not exist.IOException
- If an I/O exception occurs.public void close()
Copyright © 2014–2025. All rights reserved.