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 classA 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 StringgetResource(String resourceName) Class<?>Methods inherited from class java.net.URLClassLoader
addURL, close, definePackage, getPermissions, getResourceAsStream, getURLs, newInstance, newInstanceMethods inherited from class java.security.SecureClassLoader
defineClass, defineClassMethods 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:
loadClassin classClassLoader- Throws:
ClassNotFoundException
-
findClass
- Overrides:
findClassin classURLClassLoader- Throws:
ClassNotFoundException
-
defineClass
-
getClassSuffix
-
getResource
- Overrides:
getResourcein classClassLoader
-
findResource
- Overrides:
findResourcein classURLClassLoader
-
findResources
- Overrides:
findResourcesin classURLClassLoader- Throws:
IOException
-
getBootstrapProxy
-