Class AgentClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
io.opentelemetry.javaagent.bootstrap.AgentClassLoader
- All Implemented Interfaces:
Closeable
,AutoCloseable
Classloader used to run the core agent.
It is built around the concept of a jar inside another jar. This classloader loads the files of the internal jar to load classes and resources.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A stand-in for the bootstrap classloader. -
Constructor Summary
ConstructorsConstructorDescriptionAgentClassLoader
(File javaagentFile, String internalJarFileName) Construct a new AgentClassLoader. -
Method Summary
Modifier and TypeMethodDescriptionClass<?>
defineClass
(String name, byte[] bytes) protected Class<?>
findResource
(String name) findResources
(String name) protected String
getResource
(String resourceName) Class<?>
Methods inherited from class java.net.URLClassLoader
addURL, close, definePackage, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Constructor Details
-
AgentClassLoader
Construct a new AgentClassLoader.- Parameters:
javaagentFile
- Used for resource lookups.internalJarFileName
- File name of the internal jar
-
-
Method Details
-
loadClass
- Overrides:
loadClass
in classClassLoader
- Throws:
ClassNotFoundException
-
findClass
- Overrides:
findClass
in classURLClassLoader
- Throws:
ClassNotFoundException
-
defineClass
-
getClassSuffix
-
getResource
- Overrides:
getResource
in classClassLoader
-
findResource
- Overrides:
findResource
in classURLClassLoader
-
findResources
- Overrides:
findResources
in classURLClassLoader
- Throws:
IOException
-
getBootstrapProxy
-