public static class ClassFileLocator.ForJarFile extends Object implements ClassFileLocator, Closeable
ClassFileLocator.AgentBased, ClassFileLocator.Compound, ClassFileLocator.ForClassLoader, ClassFileLocator.ForFolder, ClassFileLocator.ForJarFile, ClassFileLocator.Resolution
CLASS_FILE_EXTENSION
Constructor and Description |
---|
ForJarFile(JarFile jarFile)
Creates a new class file locator for the given jar file.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
equals(Object other) |
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 ForJarFile(JarFile jarFile)
jarFile
- The jar file to read from.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–2015. All rights reserved.