public static class ClassFileLocator.PackageDiscriminating extends Object implements ClassFileLocator
ClassFileLocator.AgentBased, ClassFileLocator.Compound, ClassFileLocator.ForClassLoader, ClassFileLocator.ForFolder, ClassFileLocator.ForJarFile, ClassFileLocator.ForModule, ClassFileLocator.ForModuleFile, ClassFileLocator.NoOp, ClassFileLocator.PackageDiscriminating, ClassFileLocator.Resolution, ClassFileLocator.Simple
CLASS_FILE_EXTENSION
Constructor and Description |
---|
PackageDiscriminating(Map<String,ClassFileLocator> classFileLocators)
Creates a new package-discriminating class file locator.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
equals(Object object) |
int |
hashCode() |
ClassFileLocator.Resolution |
locate(String typeName)
Locates the class file for a given type and returns the binary data of the class file.
|
String |
toString() |
public PackageDiscriminating(Map<String,ClassFileLocator> classFileLocators)
classFileLocators
- A mapping of package names to class file locators where an empty string donates the default package.public ClassFileLocator.Resolution locate(String typeName) throws IOException
ClassFileLocator
locate
in interface ClassFileLocator
typeName
- 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–2017. All rights reserved.