public static class ClassFileLocator.AgentBased extends Object implements ClassFileLocator
Modifier and Type | Class and Description |
---|---|
static interface |
ClassFileLocator.AgentBased.ClassLoadingDelegate
A delegate that is queried for loading a class.
|
protected static class |
ClassFileLocator.AgentBased.ExtractionClassFileTransformer
A non-operational class file transformer that remembers the binary format of a given class.
|
ClassFileLocator.AgentBased, ClassFileLocator.Compound, ClassFileLocator.ForClassLoader, ClassFileLocator.ForFolder, ClassFileLocator.ForJarFile, ClassFileLocator.Resolution
CLASS_FILE_EXTENSION
Constructor and Description |
---|
AgentBased(Instrumentation instrumentation,
ClassFileLocator.AgentBased.ClassLoadingDelegate classLoadingDelegate)
Creates an agent-based class file locator.
|
AgentBased(Instrumentation instrumentation,
ClassLoader classLoader)
Creates an agent-based class file locator.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
static ClassFileLocator |
fromInstalledAgent(ClassLoader classLoader)
Returns an agent-based class file locator for the given class loader and an already installed
Byte Buddy-agent.
|
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 AgentBased(Instrumentation instrumentation, ClassLoader classLoader)
instrumentation
- The instrumentation to be used.classLoader
- The class loader to read a class from.public AgentBased(Instrumentation instrumentation, ClassFileLocator.AgentBased.ClassLoadingDelegate classLoadingDelegate)
instrumentation
- The instrumentation to be used.classLoadingDelegate
- The delegate responsible for class loading.public static ClassFileLocator fromInstalledAgent(ClassLoader classLoader)
classLoader
- The class loader that is expected to load the looked-up a class.public ClassFileLocator.Resolution locate(String typeName)
ClassFileLocator
locate
in interface ClassFileLocator
typeName
- The name of the type to locate a class file representation for.Copyright © 2014–2015. All rights reserved.