@HashCodeAndEqualsPlugin.Enhance public static class ClassFileLocator.Compound extends Object implements ClassFileLocator, Closeable
ClassFileLocator
that chains several locators.
Any class file locator is queried in the supplied order until one locator is able to provide an input
stream of the class file.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.Simple
CLASS_FILE_EXTENSION
Constructor and Description |
---|
Compound(ClassFileLocator... classFileLocator)
Creates a new compound class file locator.
|
Compound(List<? extends ClassFileLocator> classFileLocators)
Creates a new compound class file locator.
|
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 Compound(ClassFileLocator... classFileLocator)
classFileLocator
- The ClassFileLocator
s to be
represented by this compound class file locator in the order of their application.public Compound(List<? extends ClassFileLocator> classFileLocators)
classFileLocators
- The ClassFileLocator
s to be represented by this compound class file locator in
the order of their application.public ClassFileLocator.Resolution locate(String name) throws IOException
locate
in interface ClassFileLocator
name
- 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 Closeable
close
in interface AutoCloseable
IOException
Copyright © 2014–2024. All rights reserved.