Class AgentClassLoader

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class AgentClassLoader
    extends java.net.URLClassLoader
    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.

    • Constructor Summary

      Constructors 
      Constructor Description
      AgentClassLoader​(java.net.URL bootstrapJarLocation, java.lang.String internalJarFileName, java.lang.ClassLoader parent)
      Construct a new AgentClassLoader.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      AgentClassLoader.BootstrapClassLoaderProxy getBootstrapProxy()  
      java.net.URL getResource​(java.lang.String resourceName)  
      • Methods inherited from class java.net.URLClassLoader

        close, findResource, findResources, getResourceAsStream, getURLs, newInstance, newInstance
      • Methods inherited from class java.lang.ClassLoader

        clearAssertionStatus, getDefinedPackage, getDefinedPackages, getName, getParent, getPlatformClassLoader, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AgentClassLoader

        public AgentClassLoader​(java.net.URL bootstrapJarLocation,
                                java.lang.String internalJarFileName,
                                java.lang.ClassLoader parent)
        Construct a new AgentClassLoader.
        Parameters:
        bootstrapJarLocation - Used for resource lookups.
        internalJarFileName - File name of the internal jar
        parent - Classloader parent. Should null (bootstrap), or the platform classloader for java 9+.
    • Method Detail

      • getResource

        public java.net.URL getResource​(java.lang.String resourceName)
        Overrides:
        getResource in class java.lang.ClassLoader