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.AgentBased, ClassFileLocator.Compound, ClassFileLocator.ForClassLoader, ClassFileLocator.ForFolder, ClassFileLocator.ForJarFile, ClassFileLocator.ForModule, ClassFileLocator.ForModuleFile, ClassFileLocator.NoOp, ClassFileLocator.PackageDiscriminating, ClassFileLocator.Resolution, ClassFileLocator.SimpleCLASS_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 typeName)
Locates the class file for a given type and returns the binary data of the class file.
|
public Compound(ClassFileLocator... classFileLocator)
classFileLocator - The ClassFileLocators to be
represented by this compound class file locator in the order of their application.public Compound(List<? extends ClassFileLocator> classFileLocators)
classFileLocators - The ClassFileLocators to be represented by this compound class file locator in
the order of their application.public ClassFileLocator.Resolution locate(String typeName) throws IOException
ClassFileLocatorlocate in interface ClassFileLocatortypeName - 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–2018. All rights reserved.